Hot answers tagged

33 votes

Levi-Civita symbol: 3D matrix

More or less: \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{positioning, matrix} \usepackage{amsmath} \newcommand{\arrayfilling}[2]{ \fill[#2!30, opacity=.5] ([shift={(1mm,1mm)}]#1....
Ignasi's user avatar
  • 136k
26 votes

How to draw parallelepiped and cube with LaTeX

You can annotate the diagram in various ways. Here's one approach. coordinates are placed when constructing the cuboid. These are then used in a later path as starting points. Further coordinates are ...
cfr's user avatar
  • 194k
26 votes

How can I draw the trefoil knot in 3D co-ordinates in Latex using these parametric equations?

I think that the key here is to put more samples. This is your code, with 100 samples. I changed the domain too, from 0 to 2pi, because yours draws everything twice. I also added a view more alike to ...
Juan Castaño's user avatar
25 votes

How can I draw the trefoil knot in 3D co-ordinates in Latex using these parametric equations?

This is basic Asymptote code: // // trefoil.asy // // to get trefoil.png, run // asy -f png -render=4 trefoil.asy // // to view it in internal Asymptote 3d-viewer, run // asy -V trefoil.asy // // or,...
g.kov's user avatar
  • 21.8k
20 votes

How to draw spherical geometries with TeX?

This is a long answer since there are good tools for spherical geometry scattered all around, so I created a few sections addressing those tools. tikz-3dplot:especially tdplotdrawarc I suggest to ...
Herman Jaramillo's user avatar
19 votes
Accepted

How to draw a 3D sphere and a 3D cone for Spherical coordinates

You can draw something like your picture essentially using the canvas is... options from 3d library. For example: \tikzset { xz/.style={canvas is xz plane at y=0}, xz rotated/.style={rotate ...
Juan Castaño's user avatar
18 votes
Accepted

Render stl files in asymptote

Actually, an ascii stl file is so simple it's easy to write an Asymptote script to read it directly. Note, however, that the code below is too simple to offer useful feedback in case the stl file has ...
Charles Staats's user avatar
18 votes

Plotting chaotic maps

Metapost will be much much faster than TikZ or pgfplots. Previous answers (see the edit history) used lualatex for simple inclusion in to a document using luamplib (as well as lualatex with TikZ for ...
Mark Wibrow's user avatar
  • 70.1k
18 votes
Accepted

Complex Gaussian wave packet visualized as a 3D

This could be a starting point. It uses 3d and perspective TikZ libraries, and I'm 'reconstructin your function (hope is the right one). \documentclass[tikz,border=1.616mm]{standalone} \usetikzlibrary{...
Juan Castaño's user avatar
17 votes

Draw an aircraft with Tikz

The next revolution in aviation: The duck plane \documentclass{standalone} \usepackage{tikzducks} \begin{document} \begin{tikzpicture} \duck \fill[orange] (0.7331,0.5229) .. controls (1.8688,-0....
samcarter_is_at_topanswers.xyz's user avatar
17 votes
Accepted

Densest sphere packing

By nesting 2 for-loops one could do something like this: \documentclass{article} \usepackage{tikz} \begin{document} \begin{tikzpicture} \foreach \x in {4,...,0}{ \foreach \y in {\x,...,4}{ ...
Dynamite's user avatar
  • 292
16 votes

Draw an aircraft with Tikz

fontawesome now offers a scalable alternative to the symbol from bbding, offering both an aeroplane symbol proper and two versions of a paper aeroplane. \documentclass{article} \usepackage{...
cfr's user avatar
  • 194k
16 votes

Nice scientific pictures show off

Here are some basic maths/physics diagrams I created using Tikz in response to various forum questions online. I have just started using Tikz and hope these samples might be helpful to other beginners ...
16 votes

Nice scientific pictures show off

Some of the images took from my thesis. Instead of directly submitting the code, I will include a link to the line in the repo that contains the image in TikZ. But, the drone is actually an SVG ...
16 votes
Accepted

Illustrating Stokes theorem with asymptote

In this solution the surface is defined by function triple f(pair z){ path3 p; p=shift((0, 0, log(1+z.y / (imax / 2)))) * scale3(sqrt(1-(z.y^2)/imax^2)) * path3D; return relpoint(p,z.x); } ...
g.kov's user avatar
  • 21.8k
16 votes
Accepted

Drawing circles on a 3D Plane

You don't really need anything fancy to draw circles (or ellipses) in the coordinate planes, as you can define a coordinate system for the circle itself. By default it is drawn in the xy plane, but ...
Emma's user avatar
  • 3,453
15 votes

Nice scientific pictures show off

The intersection between a surface and a plane: \documentclass{scrartcl} \usepackage{pgfplots} \begin{document} \begin{tikzpicture} \begin{axis}[domain=0.01:30] \addplot3[surf] {min(0.,(1-0.3)*e^(-x*(...
15 votes

How can I draw the surface f(x,y)=x^2+y^2 like my picture?

The first figure with Asymptote. Other figures can be drawn in a similar way. import graph3; currentprojection=orthographic(2,1.5,.5,zoom=.95); unitsize(1cm); //currentprojection=obliqueX(40); size(...
Black Mild's user avatar
  • 17.3k
15 votes

How to delete the sphere that is inside the cylinder?

Welcome to TeX.SE!! I know you're looking for an asymptote solution. But, meanwhile I left here a very simple TikZ one: \documentclass[tikz,border=2mm]{standalone} \usetikzlibrary{perspective} \...
Juan Castaño's user avatar
14 votes

Illustrating Stokes theorem with asymptote

I wouldn't recommend your approach. How can I draw a surface "guided" by black paths and "lying" on the red path? How can I "randomize" a bit more the black guides and, consequently, the ...
Paolo Brasolin's user avatar
13 votes

Plotting intersection of a sphere with a plane

Here's a solution with Asymptote: The code to produce it: \documentclass{standalone} \usepackage{asypictureB} \begin{document} \begin{asypicture}{name=SphereAndPlane} settings.outformat = "png"; ...
Charles Staats's user avatar
13 votes
Accepted

TiKZ: How to define new 2D canvas

Here is a solution adapted from the link that you gave, TikZ: How to draw an isometric drawing in tikz. Add the following lines to your preamble: \makeatletter \tikzoption{canvas is plane}[]{\@setOxy#...
gernot's user avatar
  • 48.7k

Only top scored, non community-wiki answers of a minimum length are eligible