#
# Let's define some coordinates
#
orig:= [0, 0, 0]: # the origin
Q:= [1, -1, 1]: # no idea why the OP wants this cos it isn't used for anything
P:= [1, 2, 3]: # some random point - could be anything, just pick what you want!#
# Now generate some simple-minded plots of the
# point Q and the segment joining 0 and P
#
with(plots):
plt1:= pointplot3d( [ orig, P ],
connect,
color =red
): # the segment
plt2:= pointplot3d( Q,
symbol=solidsphere,
symbolsize=20,
color=blue
):# the mysterious, meaningless(?) point Q
#
# Display the above plots
#
display( [plt1, plt2], axes=normal);#
# Do more-or-less the same thing using the geom3d package
#
with(geom3d):
point( origPt, orig ):
point( Qpt, Q ):
point( Ppt, P ):
segment( seg, [ origPt, Ppt ] ):#
# generate the plots using the geom3D package
#
plt3:= draw( seg,
color=red
):
plt4:= draw( Qpt,
symbol=solidsphere,
symbolsize=20,
color=blue
):
display( [plt3, plt4], axes=normal );#
# And if I wanted to generate the parametric equation
# of the line passing throught the origin and P, then
# the following is probably as simple as I can get -
# althugh there are many other ways to do this
#
line(l1, [origPt, Ppt] ):
Equation(l1, 't');