ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 22 Mar 2019 19:16:55 +01003D line from equations to parametrichttps://ask.sagemath.org/question/45870/3d-line-from-equations-to-parametric/ In 3D space, given a line defined as the solution of two equations (two planes intersection) like in:
sage: x,y,z=var('x y z')
sage: eqns = [x + y + 2*z - 25 == 0, -x + y - 25 == 0]
how to obtain the direction vector and one (any) line point (parametric form) ?
This solution from solve:
sage: solve( eqns, [x,y,z] )
[[x == -r13, y == -r13 + 25, z == r13]]
has an answer in parametric form, but with parameter "r13" that has a name unpredictable and not usable in next steps.
This solution from solve:
sage: solve( eqns, [y,z] )
[[y == x + 25, z == -x]]
solves the issues of the previous, but it has been assumed that "x" is a valid parameter for the line ( something not true, by example, in case of vertical line: [ x==10 , y==2 ] )
The target is, by example, to obtain a parametric expression of any line that after can be used in a call to "parametric_plot3d".
pasaba por aquiFri, 22 Mar 2019 19:16:55 +0100https://ask.sagemath.org/question/45870/