# Line,Plane, Points 3D, Intersection,

Is there a tutorial on -analytical geometry(vectors) : plane line 2D circle in 3D, plot chains of vectors, basicaly the everything what this thing can do: https://www.geogebra.org/3d?lang=de well allmost everything in vector geometry for python or sagemath.

Maybe someone saw a book or tutorial on this

I can not find anything on this.

I have managed to plot points

from sage.plot.plot3d.shapes2 import frame3d
F=frame3d([0,0,0],vector([10,10,10]),color='red')
A=point3d((4,3,2),size=10,color='red',opacity=.5)
e=0.2
eps=vector([4+e,3+e,2+e])
T = text3d('A',eps)
F+A+T


I didnt manage to label, point A(4,3,2), to to do it? I would rather not put the coordinates as a string. Is there something like in c++ "The point is %d"

Is there a better way to plot? I need the frame, since the plot 3d is not accepting, text, or maybe i am wrong?

Would there by a natural way to plot x,y,z axes?

Here is the Code https://share.cocalc.com/share/a3f14e...

edit retag close merge delete

Sort by » oldest newest most voted

You can try plotting points and vectors of Euclidean spaces: those have automatic labeling in 2D and 3D plots. For instance:

E.<x,y,z> = EuclideanSpace()
A = E.point((4,3,2), name='A')
v = E.tangent_space(A)((1,2,1), name='v')  # a vector at A
A.plot(size=20, color='red', opacity=0.5) + v.plot(color='green')

• Remark 1: the command A = E.point((4,3,2), name='A') can be shorten to A = E((4,3,2), name='A') (this notation reflects SageMath's parent/element framework, points being elements of the Euclidean space E)
• Remark 2: the notation E.tangent_space(A)((1,2,1)) arises from differential geometry; it simply means the vector at A whose components are (1,2,1)

For more details and examples see https://sagemanifolds.obspm.fr/vector...

more