Questions tagged [3d]

{3d} is about three-dimensional content, e.g., images and drawings.

11
votes
2answers
1k views

Densest sphere packing

I would like to represent the densest sphere packing in dimension 3 as the following picture, for a beamer presentation. Is Tikz the way to go for it? It is not a real 3D drawing since I only want a ...
2
votes
1answer
37 views

Gnuplot 3D splot in tikz raw gnuplot (without pgfplots)

please look at the following MWE: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=.5] \draw[color=blue] plot[raw gnuplot, smooth] function{ splot sin(x)*sin(y)}...
1
vote
0answers
53 views

Suggestions for creating high-quality 3D line drawings

When I'm creating 2D graphics for my math lectures (for Beamer presentations and lecture notes), I'm very happy with TikZ and I've been using it for many years now. However, I still haven't found a ...
-1
votes
1answer
58 views

help drawing a plane cutting a cone

I am trying to draw the following figure with 3d Tikz but with little success. My codes will be posted here after some corrections. I am a newbie and would appreciate any hint from the forum. ...
3
votes
1answer
54 views

How to make letters size on picture the same as in text

The following two pictures are drawn in TikZ 3D (the first) and in Asymptote (the second). It is visible that the letter sizes for the Asymptote picture are bigger than the ones with TikZ 3D (for ...
3
votes
1answer
40 views

pgfplots: How to smoothen a 3D surface plot?

Long time has passed - based on this and this question I would like to know if pgfplots does already support surface smoothening of coordinate based 3D plots in 2019? Minimum Working Example (MWE): \...
2
votes
1answer
40 views

pgfplots: How to draw mesh of 3D plot only in y direction (but not in x direction)?

Assumed we draw a simple 3D plot with pgfplots. Minimum Working Example (MWE): \documentclass{standalone} \usepackage{pgfplots,pgfplotstable} \usepackage{filecontents} \begin{filecontents}{testdata....
1
vote
1answer
122 views

How to draw toroidal grid diagrams in TikZ [duplicate]

I am trying to turn a planar grid diagram into a 3D toroidal graph by identifying the top edge with the bottom and the left with the right, i.e: So the grid below on the left would be transformed ...
4
votes
1answer
317 views

Drawing spherical mirrors

What is the best way to draw 3D spherical mirrors like these on tikz?
1
vote
1answer
55 views

How to fill region under a surface?

I'm trying to fill the region under the surface z = x^2 + y^2, over the rectangle 0<=x<=1, 0<=y<=1. How may I do so? Also, how do I orient the 3-d plot to as to have the x-axis coming ...
1
vote
0answers
47 views

Plot Velocity field having three components with Quiver pgfplots

I am stuck into plotting velocity field having three components. My data file contains velocity values on a plane y=0. My data is in the form. x z u v w where x and z are coordinates on y plane ...
0
votes
0answers
60 views

Multiple 2D Gaussian ellipses in 3D plot

I'd like to plot different bivariate Gaussian distributions as shaded 2D ellipses at different points in 3D space. The 2D ellipses I would plot like Jake suggests in Gaussian ellipsoids using tikz, ...
5
votes
1answer
766 views

A diagram about partial derivatives of f(x,y)

How can I draw this image using TikZ?
2
votes
1answer
38 views

How to change viewpoint when using logarithmic scale with pgfplots?

I want to display a surface, with 3 points sitting on it. I attempted to combine two posts, with partial success. If I change the viewpoint, I receive the upper figure. In this case the log scaling ...
2
votes
1answer
73 views

How can one go about drawing a sphere with a hole using pgfplots or TikZ?

I want to draw a sphere with a hole as shown below: What I have done so far is to create an outline of the required shape in Inkscape and export to a pstricks picture. The autogenerated code is as ...
9
votes
3answers
1k views

How to draw cubes in a 3 dimensional plane

So I want to draw a picture like this. However I can get no where close to it. I have tried following other posts and adapting them which has allowed be to set the axis up correctly but I just cannot ...
1
vote
1answer
31 views

Projecting contour on the floor in a 3d plot

The contour is drawn on the top surface, I'm trying to plot the contour on the floor (A-B). \documentclass{standalone} \usepackage{pgfplots} \pgfplotsset{width=10cm, compat=1.9} \begin{document} \...
26
votes
2answers
1k views

Levi-Civita symbol: 3D matrix

During the current review of the tensors I have arrived at a page of Wikipedia where you can see the symbol of Levi-Civita in a beautiful three-dimensional matrix. I hope that nobody will be angry ...
2
votes
0answers
74 views

3D Lighting & Shading with TikZ/PGFPlots

I'm trying to shade 3D parametric surfaces using a basic 3D lighting model, but this answer says that TikZ has no support for lighting. The only option is to use color gradients to shade vertices. ...
1
vote
1answer
63 views

How could I graph z=sqrt(x^2-y^2) using Pgftools? I believe I've all suggestions on the internet but to no avail

I have tried graphing it with the parametric notation (i.e. ({x},{y},{sort(x^2-y^2)}) and as seen on my code below but nothing renders the image shown on graphing calculators. \begin{tikzpicture}[...
1
vote
1answer
64 views

How can I 3D plot y=4x^2+z^2 using Pgfplots?

I am trying to 3D plot y=4x^2+z^2 using Pgftools but I'm unable to use z as an independent variable in the function. \begin{tikzpicture}[scale=1.5] \begin{axis}[ grid=major, 3d box=complete, ...
3
votes
1answer
88 views

Restricting Domain of 3D Plot

I have this 3D plot: I would like to plot the function only over the region over the darker half of the bottom (the part closer to us). Here is a MWE: \PassOptionsToPackage{usenames,dvipsnames,...
3
votes
1answer
58 views

Drawing Solid Lines on 3D Plots

I am trying to draw a line moving along with a 3D graph to represent the region of integration. So for this, the black line on the bottom represents the cut off for the region of integration. I ...
3
votes
1answer
137 views

Tikz/Pgf - Surf plot with smooth color transition

I am drawing a surf 3d plot in Tikz/Pgf using gnuplot. This surface need to be projected on a plane, which can be achieved by adding another surf plot. The thing is that the transition between colors,...
3
votes
1answer
125 views

Smooth projection of a surf plot - tikz/gnuplot

I am drawing a 3D-Bessel function using pgfplots and gnuplot. What I am trying to do is plot on top of the 3d box, a projection of the 3d function. I thought of using a contour gnuplot plot, but ...
2
votes
1answer
96 views

Plotting a smooth curve in 3D from external coordinate file

I want to create a 3D plot from previously calculated coordinates saved in a file, like "xz.dat". This contains the data as : x z 0.5 0 0.54 0.01 0.58 0.01 0.62 0.02 0.66 0.03 0.7 0.03 0.74 0.04 0....
8
votes
1answer
487 views

3D buried view in Tikz

I want to achieve 3D effect in my picture. This is to show Electron beam lithography followed by lift-off process. I want to make a cross shaped hole in the top layer and fill it with a gray color ...
2
votes
1answer
146 views

Filling In Region of 3D Plot

I am trying to fill in the area under this 3D graph, using the idea from this post. Here is a MWE for the function I want to plot under: \PassOptionsToPackage{usenames,dvipsnames,table,x11names}{...
3
votes
1answer
62 views

Planar disk axisymmetric

I'm trying to recreate this image: The figure is representing an axisymmetric representation (cylindrical coordinate system) of 2 planar coils of wire. I am wanting to add some intuition to the ...
2
votes
3answers
162 views

TikZ PGF: How to hide parts of 3D graph when lower than surface?

Assumed we have this kind of 3D surface: Minimum Working Example: \documentclass[tikz]{standalone} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[zmin=0,zmax=0.5,...
4
votes
1answer
114 views

TikZ PGF: How to draw crater-like 3D surface based on polynomial equations?

Assumed we have some kind of squared 3D graph like this one: Minimum Working Example (MWE): \documentclass{standalone} \usepackage{tikz, pgfplots} \begin{document} \begin{tikzpicture} \begin{...
2
votes
1answer
105 views

TikZ PGF: How to draw 3D graph based on polynomial equation?

Unfortunately the TikZ-manual is a bit complicated to understand about this point. Assumed we have some kind of squared 3D graph like this one: Minimum Working Example (MWE): \documentclass{...
2
votes
1answer
185 views

Is there a command to find coordinates of projection of a point on a plane?

Let SABC be a tetrahedron, SA = c, AB = a, AC = b, SA perpendicular to AB, AB perpendicular to AC, and AC perpendicular to SA. I am trying to find the projection H of the point A on the plane SBC. I ...
5
votes
1answer
158 views

How to draw cylinder and cone to finish this drawing?

After a lot of attempts without success, I am asking here: How to draw a cylinder connecting the two circles? How to draw a cone from point A to the nearest circle? \documentclass[tikz,border=5pt]{...
3
votes
1answer
104 views

Is there a command to find coordinates of projection of a point on a line in 3D?

Sometimes, I need determine coordinates of projection of a point on a line in 3D. I know The Syntax of Projection in 2D at 13.5.5 The Syntax of Projection Modifiers at Manual for Version 3.1. This ...
1
vote
1answer
132 views

TikZ PGF: How to develop cell values for 3D graph?

Currently there are some awesome pgfplots around here. I think about something like this one: Minimum Working Example (MWE): \documentclass[border=5mm]{standalone} \usepackage{pgfplots, filecontents}...
4
votes
1answer
84 views

Improve perspective visualization in 3d plot

I'm trying to vizualize the computation of Euclidean distance in 3d using pgfplots. This is my current attempt: \documentclass{article} \usepackage{pgfplots} \begin{document} $\mathrm{dist}(p,q) = \...
4
votes
1answer
777 views

How to draw a circle (sphere) passing through four points?

I am trying to draw a circle (sphere) passing through four points B, C, E, F like this picture I tried with tikz-3dplot and my code \documentclass[border=3mm,12pt]{standalone} \usepackage{fouriernc}...
2
votes
3answers
112 views

parallelepiped inscribed in cylinder

I 'm trying to draw a simple 3D shape (like parallelepiped or cylinder) with tikz, but I fund too complicated codes. I want to draw something like this Is it possible with a simple code? Thank's ...
4
votes
1answer
214 views

Chemfig: a 3d molecule

I want to draw the molecule attached with chemfig. Could not find anything for the core of the connections. Any idea?
4
votes
1answer
97 views

How to make cuboids with different dimensions xyz with TikZ

I want to plot blocks (transportation pallets). Each block has 0.8m width, 1.2m depth, and 2.15m high, and they are placed horizontally (only one block height) grouped 2x2, 3x3, 4x4, 5x5, 6x6, 7x7 ...
3
votes
1answer
62 views

A dot using \pstThreeDDot

I want to put a dot on the beginning of the red line. My code is: \documentclass[a4paper,pstricks,11pt]{report} \usepackage{amssymb} \usepackage{latexsym} \usepackage{amsmath} \usepackage[usenames]{...
2
votes
1answer
63 views

Vertical surface with lines using \psSolid

I’m trying to put a line on a top of this surface (like the red one but on the top of the surface). Here it is the code: \documentclass[a4paper,pstricks,11pt]{report} \usepackage{amssymb} \...
1
vote
1answer
135 views

Drawing closed 3d path with pgfplots

I'd like to reproduce the following 3d image using pgfplots the battery doesn't need to be there, just the closed path and the axis. I haven't been able to find any examples of 3d paths that are ...
2
votes
1answer
155 views

Sphere Segments in PGF/TIKZ

I want to draw sphere segments, I made a sketch here: An optional bonus would be to separate the segments slightly in x1 direction. Any help would be appreciated!
7
votes
1answer
82 views

PGFPlots - how to avoid aliasing when plotting 3d surface on limited domain

I'm trying to render the following plot so that the shading goes right up to the bounding curve without this jagged aliasing. The function is $\frac{x}{y^5 + 1}$ in the domain $\sqrt{x} \le y \le 2$ ...
3
votes
1answer
90 views

Mapping with Tikz and Gnuplot in defined area

i´m trying to plot some x,y and z values from a .txt-file with gnuplot in Latex. The plotting itself works fine. The Problem is, that there should be a defined Outline surrounding my plot. Everything ...
6
votes
1answer
202 views

Draw a sphere with a handle with TikZ

I am trying to draw a sphere with a handle similar to the one I have attached below with the package TikZ. Unfortunately, while I know how to draw a sphere or a torus, I don't know how to put them ...
1
vote
1answer
72 views

3D Piecewise Plot with varying bounds in Tikz/PGF

The function to be plotted reads as In it, these constrains hold true: If plotted it looks like Please excuse the different symbols, I will explain: p/p_0 is equivalent to \Pi and \gamma is ...
3
votes
2answers
192 views

Draw the three cylindrical sections

I want to draw the three conic sections (circle, ellipse and rectangle) where the cylinder and cross sections are colored: \documentclass{standalone} \usepackage{tikz} \usepackage{animate} \...