ASKSAGE: Sage Q&A Forum - Individual question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 07 Apr 2019 08:33:48 -0500Line,Plane, Points 3D, Intersection,https://ask.sagemath.org/question/46033/lineplane-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/a3f14e05-7729-406f-97c5-be5b73646381/vector/ebene.sagews?viewer=shareSat, 06 Apr 2019 12:52:46 -0500https://ask.sagemath.org/question/46033/lineplane-points-3d-intersection/Answer by eric_g for <p>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: <a href="https://www.geogebra.org/3d?lang=de">https://www.geogebra.org/3d?lang=de</a>
well allmost everything in vector geometry
for python or sagemath.</p>
<p>Maybe someone saw a book or tutorial on this</p>
<p>I can not find anything on this. </p>
<p>I have managed to plot points</p>
<pre><code>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
</code></pre>
<p>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"</p>
<p>Is there a better way to plot? I need the frame, since the plot 3d is not accepting, text, or maybe i am wrong?</p>
<p>Would there by a natural way to plot x,y,z axes?</p>
<p>Here is the Code
<a href="https://share.cocalc.com/share/a3f14e05-7729-406f-97c5-be5b73646381/vector/ebene.sagews?viewer=share">https://share.cocalc.com/share/a3f14e...</a></p>
https://ask.sagemath.org/question/46033/lineplane-points-3d-intersection/?answer=46037#post-id-46037You can try plotting points and vectors of [Euclidean spaces](http://doc.sagemath.org/html/en/reference/manifolds/sage/manifolds/differentiable/euclidean.html): 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_calculus.htmlSun, 07 Apr 2019 08:33:48 -0500https://ask.sagemath.org/question/46033/lineplane-points-3d-intersection/?answer=46037#post-id-46037