1

I need to make a bunch of 3D figures for a geometry document. Roughly speacking, parametric surfaces, some vectors, planes, and, very important : I need to include some LaTeX text (axes names, point names...). Here is typical example of what I want.

The attached figure was produced using GeoGebra, and then I used Ksnapshot to make a screenshot. This gives a .png, which is almost o.k. The fact is that I need these figures .pdf or .ps. GeoGebra does not export the 3D view in any of these formats.

I tried some alternatives, but none is completely satisfying. Basically my problem is that none of my usual tools works (GeoGebra, SAGE, R), so I need to learn something new, and quite fast in fact. I am a math guy, not a programmer.

  • Sage or SageMathCloud : one cannot annotate easily using LaTeX.
  • TexGraph : pretty hard to get some results. Documentation quite cryptic, problems handling singularities (the cone vertex for instance) and not easy to obtain the good combination of opacities.
  • I did not try it myself, but someone told me that to put the latex annotations in Mathematica is not possible. I do not use Mathematica, in fact.
  • I took a look at TiKZ. The code seems pretty cumbersome and cryptic too.

Any suggestions? Python and matplotlib? I don't know about Python, so if this is a suggestion, I would appreciate a good "Python for newbies" reference too.

Can Inkscape do this job? Any suggestion is welcome!

Thanks a lot!

JC

JCBR
  • 21
  • 1
  • 5
  • I've just searched on http://softwarerecs.stackexchange.com/ and couldn't find your question there. You might ask there. – Bill Bell Dec 16 '16 at 15:36

2 Answers2

0

Matplotlib fully support latex for legend, text, annotations ... http://matplotlib.org/users/usetex.html

Ger
  • 9,076
  • 10
  • 37
  • 48
0

It's not so diffucult with TeXgraph !

[ModelView(central), view(-6,6,-6,6), Marges(0,0,0,0), size(12),
view3D(-5,5,-5,5,-5,5), theta:=80*deg, phi:=55*deg,
C:=Cone(Origin, 5*vecK,3),
P:= [M(1.5,0,0), M(1,0,1)],
E:=Intersection(P,C),
F:= for z in E By 2 do pxy(z) od,
A:=M(9/16,0,15/16),
U:=1.5*normalize(M(1,0,-1)),
V:=1.5*vecJ,
N:= 1.5*normalize(M(1,0,1)),
LineStyle:=userdash, Color:=darkgreen, Width:=12,
Ligne3D(Merge3d(F),1),
Build3D(
        bdPlan(P,[color:=lightsalmon, border:=1, scale:=0.75, opacity:=0.9]),
        bdCone(Origin, 5*vecK,3, [color:=violet, border:=1, opacity:=1,   nbfacet:=50]),
        bdLine([A+U,A,A+V], [color:=darkgreen, width:=12, arrows:=2]),
        bdLine([A,A+N], [color:=crimson, width:=12, arrows:=1]),
        bdAxes(Origin, [arrows:=1])
        ),
Display3D(),
DrawAretes(E),
LabelDot3D(A,"$S$","O",1),
Color:=crimson,
LabelDot3D(A+N,"$\vec{n}$","NO"),
]

Result with TeXgraph

mittag
  • 1