Ask Your Question
0

Line,Plane, Points 3D, Intersection,

asked 2019-04-06 19:52:46 +0100

thetha gravatar image

updated 2019-04-06 23:36:45 +0100

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-04-07 15:33:48 +0100

eric_g gravatar image

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...

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-04-06 19:52:46 +0100

Seen: 1,362 times

Last updated: Apr 07 '19