Questions tagged [tikz-3d]
For questions about projections using {tikz-pgf} including PGF's `3d` library.
156
questions
1
vote
1
answer
41
views
how can get 3d axis labels in latex tikzpicture?
I am trying to draw the latex picture as same as shown in the given image. Almost all I have done but I am unable to draw the axis label as shown in the image. Please anyone can help me?
\...
3
votes
0
answers
46
views
How to achieve one point perspective for a given tikz-3dplot?
I am trying to replicate this drawing with tikz-3dplot:
I have already done the main drawing (above, second image), but I cannot achieve the perspective. I tried with the perspective library and some ...
0
votes
1
answer
28
views
Shifting Origin of Coordinate Systems with Custom Axes
I want to draw a second coordinate system at position (0,0,2).
Here is my code:
\documentclass{standalone}
\usepackage{pgfplots}
\usetikzlibrary{calc}
\pgfplotsset{compat=1.8}
\begin{document}
\begin{...
1
vote
1
answer
65
views
Placing multiple Coordinate Systems in one Image
I want to visualize two coordinate systems in one image.
Minimal working example:
\documentclass{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.8}
\begin{document}
\begin{tikzpicture}
\begin{...
2
votes
0
answers
20
views
Node at intersections not rendering in tikz-3dplot
I just started using tikz-3dplot. I'm having an issue that I created two arcs and I want to place a labeled node at their intersection. For some reason I keep getting an error that the name of the ...
1
vote
0
answers
64
views
Draw an arc in 3dtools
I've been trying to figure out how to use 3dtools to draw celestial diagrams.
I have an issue in that I'm unsure on the correct syntax to use to draw part of an arc lying on a sphere. For example, in ...
0
votes
0
answers
38
views
Sphere with a randomly marked region and an equatorial circle
I'm working with spheres in 3D and would like to draw a sphere with an open region $U$ with color green and enclosed closed region $E$ filled with color red such that $E \subset U$. And a vector $x$ ...
0
votes
0
answers
29
views
TikZ pgfplot 3d graph number positioning
Can you see the x-axis ticks (r_{AB})? There are two lines: I would like to make sure that the numbers lie underneath in the line that goes downwards.
\documentclass[12pt]{article}
\usepackage{tikz}
...
0
votes
0
answers
28
views
The method of drawing 3D shapes that stack each other allows the shapes to be rotated without overlapping lines [duplicate]
I'm trying to draw adjacent cubes like this:
When I rotate the shape I just drew, it gets distorted due to the order of drawing the cubes. The lines of the later shapes overlap the earlier ones. Is ...
0
votes
1
answer
61
views
How to build the 3d cartesian coordinate system like this and add this graph
When I used the pgfplots or tikz3d I have a problem that the x,y,z axis doesn't like this.
They always incline from it should be like the below image. How to set the x,y,z axis that x-axis is towards ...
5
votes
1
answer
155
views
Add arrow to Helix code
Based on the question Helix question, I would like to be able to add an arrow at the end of these, at the beginning or at the end, how could I do it in the simplest way?
One of the answer codes is the ...
0
votes
0
answers
68
views
How to draw and color a spherical cap of arbitrary radius at a given point in a sphere using Tikz
I was wondering if there was an easy way of drawing and coloring a spherical cap centred at a certain point in a sphere. I have seen relationed questions like this one, but the spherical cap cannot be ...
0
votes
1
answer
89
views
Have sides of translucent cylinder appear
This is a very simple answer probably, but I want/need the sides of this cylinder to appear. The goal is to have it be for volumes of rotation by cylindrical shells.
The goal is to have something like ...
3
votes
0
answers
74
views
Draw vector field on top of surface of spherical octant, but not in specific regions
I am interested in drawing a vector-like field towards, or away from, a single point on the surface of a unit octant. If possible, I would like to constrain this to not occur within an area spanned by ...
2
votes
0
answers
75
views
tikz: specifying coordiantes system in 3d
currently I am working with TikZ program in latex to draw a 3d figure. I need to redefine a coordinates system in 3d. The following is a MWE I tried:
\documentclass{scrreprt}
\usepackage{tikz}
\...
2
votes
1
answer
82
views
Draw a surface in a nonrectangular domain
I have the following code to draw a surface using tikz-3d:
\documentclass{standalone}
\usepackage{tikz,tikz-3dplot}
\begin{document}
\tdplotsetmaincoords{75}{135}
\begin{tikzpicture}[...
0
votes
1
answer
37
views
Positioning Axis Label to End of Axes in 3d
How do I position the axis label so that it looks like the following picture (at the end of the axis as if it was an extension of the axis):
\pgfplotsset{
every non boxed x axis/.style={
...
0
votes
2
answers
116
views
3D view of a 2D rectangle
I would be grateful to know how to:
fix the code to make it work
be able to control the viewing angle so that I can see the rectangle like the top surface of this image
\documentclass{article}
\...
0
votes
1
answer
71
views
Pgf cone drawing
I used the following code, below which is altered from https://latexdraw.com/draw-a-plane-intersecting-a-cone-in-latex/
\documentclass{standalone}
\usepackage{pgfplots}
\usepgfplotslibrary{colormaps}
...
0
votes
0
answers
85
views
Truncated parabolic cylinder
I would like to know if it is possible to draw an image like this in 3D using tikz? Am not acquainted yet with 3D diagrams in TikZ and I would like to draw something like the picture attached. Does ...
1
vote
0
answers
92
views
3D Plot - Step Function
I would like to generate a 3D picture for a step function, something like this:
but I got stuck. Below, I tried something.
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{3d}
\begin{...
0
votes
1
answer
317
views
(A cube with labeled vertices) How to draw a cube with a letter written on each of the vertices, and the invisibible edges are marked as dotted lines
Please edit for suitable tags, if you know some related tag.
See the 3rd page of this paper by Bhargava.
There is a cube drawn there, which you can see in the image below (everything is black and ...
1
vote
1
answer
104
views
Filling in capped off torus in tikz 3d
I am trying to draw a capped off torus in tikz 3d, see MWE below. I'd like the surface to be colored in gray for the first picture, and everything below the blue line to be colored in gray for the ...
3
votes
1
answer
371
views
How to draw the following sphere with cylinder in it?
I want to draw the following picture using tikz?
For this I used the code of
https://tex.stackexchange.com/a/597008/241755
post but I want x-axes to be from origin to right. It is not just a matter ...
3
votes
1
answer
155
views
Creating a filled curved surface with TikZ
I'm trying to color the surface of a cylinder using an isometric perspective with TikZ. Is this something TikZ is capable of? What I've done is approximating the surface with two rectangles, which ...
4
votes
2
answers
222
views
Rotating a plane around its edge on TikZ
I'm trying to rotate the red plane in the right side around the its edge AB, the question is actually about rotating anything around a arbitrary path, I know the rotate around command and that I can ...
4
votes
1
answer
96
views
How change the cuboid side where items A, B, C are located
I would like to change this isometric figure
\documentclass[tikz,border=1.618]{standalone}
\usetikzlibrary{3d,perspective}
\tikzset
{
abc/.style={fill=red,text=white,transform shape},
pics/my ...
10
votes
2
answers
606
views
Drawing a basket in Tikz 3d
For some mathematics project I'm trying to draw a basket as sketched in the picture below,
I've gotten some of the lines of the basket in, see picture below after the MWE, however I'm still ...
1
vote
1
answer
210
views
Help with labels in TikZ
I'm using PlotNeuralNet (with slightly modified Python code) to generate TikZ code for my neural network architecture. Currently, it generates this TikZ code (it is a simplified version of my full ...
0
votes
3
answers
459
views
Add angles in TikZ-3d
I've done this figure in TikZ, but I don't know how to add and label the angles in TikZ-3D, how can I do it?
Here's the original figure :
Here's mine plus the code :
\documentclass[tikz]{standalone}
\...
0
votes
0
answers
76
views
pgfplots surface not interpolating with neighbors
I am attempting to plot a relatively non-standard surface using pgfplots. The function is declared correctly, and when I create a scatter plot, everything looks as it should (note that this angle in ...
2
votes
1
answer
189
views
Fill a 3d surface with a gradient rather than solid colour
I wish to plot a 3d surface based on its outline coordinates provided in a file data.txt.
The following code works as expected.
\usepackage{pgfplots}
\pgfplotsset{compat = newest}
\begin{document}
...
0
votes
1
answer
182
views
Adjust 3D-plot (with pgf TikZ) to textwidth or linewidth. Make 3D plot bigger
I want to plot a 3D-plot with pgf TikZ importing csv data. Everything works fine.
However, I want to make the whole graphic bigger, that it fits to the textwitdh and is better adjusted in the ...
12
votes
1
answer
695
views
How to draw a 3D sphere and a 3D cone for Spherical coordinates
I'm trying to replicate this figure:
Right know, I have this code:
\begin{figure}[H]
\centering
\begin{tikzpicture}[yzx, scale = 0.9]
\draw[->] (0,0,0) -- (5.5,0,0) node(x)[left]{$...
3
votes
1
answer
190
views
How to draw the solids to refer to cylindricals coordinates
I'm trying to replicate this figure:
but I don't know how to draw these planes. I need to draw the plane for constant z, rho and phi. I know that, to draw this, many lines of code are needed but the ...
0
votes
1
answer
246
views
How to draw a 3D sphere with axes and vectors and some text in TikZ
I was trying to reproduce this particular plot in Latex. I would like also to be able to write some text to the side or inside of the sphere. Thanks.
EDIT:
I am adding my attempt here as well as ...
3
votes
2
answers
207
views
Help Me to Create Animation from Still Tikz-3D Image with changing value of one variable
I am just learning tikz with still image. This is my first trying to create animation.
I have this code:
\documentclass{article}
\usepackage{tikz}
\usepackage{tikz-3dplot}
\tdplotsetmaincoords{0}{0}
\...
1
vote
1
answer
321
views
scale & view at 3d plot
I want to have the graph of this function:
Here how it looks like from geogebra:
I wanted to draw it with tikz, so I wrote this code:
\documentclass[a4paper, 12pt]{article}
\usepackage{pgfplots}
\...
4
votes
1
answer
1k
views
Draw Realistic 3D crystal structure of Diamond using Tikz
Can I draw this same exact picture(from Draw realistic 3D crystal structures (diamond)) using tikz in latex?
This is what I got till now.
from the code:
\begin{tikzpicture}
\...
6
votes
3
answers
991
views
How to draw 3d cylinder directed in x axis with TikZ?
How to draw cylinder directed in x axis?
\documentclass[tikz]{standalone}
\usetikzlibrary{3d}
\begin{document}
\begin{tikzpicture}[x={(1cm,0.4cm)}, y={(8mm, -3mm)}, z={(0cm,1cm)}, line cap=round, ...
6
votes
1
answer
248
views
Cut bar by plane (tikz, 3D)
How to draw a gray strip realistically cut in half with a red plane?
My idea is to paint some pieces on another layer. But here the joints turned out ugly. Maybe there is another tricky way?
\...
1
vote
2
answers
333
views
3D boxes in perspective
I am trying to draw 3D boxes in perspective, but with no success. The intention is to have several boxes with different sizes on top of each other, like this:
This is my MWE:
\documentclass{article}
\...
2
votes
1
answer
458
views
Draw 3D shapes in perspective with tikz
Is it possible to draw a parallelepiped in perspective such as shown in the figure below (with colors, transparency, edges, etc)? Is it easily feasible using tikz or do I need other library?
Notes: ...
4
votes
2
answers
705
views
3d rectangles in TikZ
I need to draw several similar shapes like this:
My code:
\documentclass[tikz,border=1mm]{standalone}
\usetikzlibrary{perspective}
\def\r{0.5}
\def\ri{\r*0.5}
\def\rii{\r*sqrt(2)/2}
\def\riii{\r*...
3
votes
4
answers
675
views
How to draw a circle in 3D such that the plane containing the circle is orthogonal to a given vector?
How do I draw a circle in 3D space such that the plane containing the circle is orthogonal to a given vector?
1
vote
0
answers
106
views
How to draw on any plane with 3dtools
Salvation
I am testing the 3Dtools library (https://github.com/marmotghost/tikz-3dtools).
I find the idea interesting.
It is possible to define a plane either by 3 points, or by a vector and a point, ...
4
votes
1
answer
417
views
3D Geometry using Tikz
I use the following code to generate a 2D geometry:
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{...
-2
votes
2
answers
106
views
Drawing 3D perpendicular rectangles in latex
Here is the picture I want to draw:
I want to be able to change the yellow color also. also, not that the arrows are reversed on the grey rectangle Could someone help me in doing so please?
3
votes
2
answers
795
views
How to draw on a curved 3D surface?
I'm trying to reproduce in LaTeX this image, hand-drawn with Mathcha.
The thing is, I can't find anything online about how to draw on curved (smooth) 3d surfaces like this sphere.
Technically, the ...
10
votes
1
answer
618
views
How do I shade a cone to match ball shading?
How do I shade a cone like this
Note that the bright part is wider at the bottom (because the radius is greater there).
The intent is that the cone and \tikz \shadedraw[ball color=red] circle[radius=...