Drawing 3D lines with LINE

04182019, 07:54 PM
(This post was last modified: 04182019 07:56 PM by Eddie W. Shore.)
Post: #1




Drawing 3D lines with LINE
LINE(points definition, line definition, rotation matrix)
LINE(prerotated points, line definition) I am trying to draw a 3D line from (0,0,0) to (1,2,1). I think I have the points definition down but the snytax of line definition confused me. The line definition has the format {p1, p2, color*, alpha*}. P1 and P2 are index points but how do I use this? What is the prerotated matrix? What is the quickest and easiest way to draw a 3D line between (0,0,0) and (1,2,1)? Also, how does the rotation matrix work? Thank you,. Eddie 

04182019, 09:13 PM
Post: #2




RE: Drawing 3D lines with LINE
— Ian Abbott 

04192019, 01:37 AM
Post: #3




RE: Drawing 3D lines with LINE
Yes Ian. However, I'm still not sure about P1 and P2 of the line definition matrix.


04192019, 01:50 AM
Post: #4




RE: Drawing 3D lines with LINE
Take a look at the built in example program. Believe it rotates a tetrahedron from memory...
TW Although I work for the HP calculator group, the views and opinions I post here are my own. 

04192019, 04:19 AM
Post: #5




RE: Drawing 3D lines with LINE
(04192019 01:37 AM)Eddie W. Shore Wrote: Yes Ian. However, I'm still not sure about P1 and P2 of the line definition matrix. The values p1 and p2 are the index values (within the points definition) corresponding to the two endpoints of the line you wish to draw. Each line is of the form { p1, p2, color, alpha } (last two parameters are optional, I think). I.e. if you call your points definition 'ptsdef' then the command draws a line starting from the point ptsdef(p1) and ending at the point ptsdef(p2). Graph 3D  QPI  SolveSys 

04192019, 05:40 AM
Post: #6




RE: Drawing 3D lines with LINE
Thank you, Han, much appreciated.


« Next Oldest  Next Newest »

User(s) browsing this thread: 1 Guest(s)