can you add text to a 3D drawing in a program - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html) +--- Forum: HP Prime (/forum-5.html) +--- Thread: can you add text to a 3D drawing in a program (/thread-19546.html) |
can you add text to a 3D drawing in a program - dmh - 02-12-2023 11:57 AM I've done a 3D drawing using LINE and I want to label the vertices etc with text. From the manual it appears TEXTOUT doesn't have an advanced option to do this (ie take a 3D position like LINE). Is there anyway to do this? TIA, dmh RE: can you add text to a 3D drawing in a program - Dougggg - 02-13-2023 12:37 AM if you know the angle of the line you could use this to rotate the text ATEXT (SS,XX,YY,ZZ) BEGIN DIMGROB_P(G1,83,12,RGB(255,255,255)); TEXTOUT_P(SS,G1,10,1,1,RGB(0,0,0)); ROTATE(G1,-ZZ); BLIT_P(G0,{XX,YY},G1); ROTATE(G1,ZZ); END; it puts the text in G1 and rotates it to angle (ZZ) and uses blit to put it in the g0 what i used it for -ZZ worked but you can experiment, I just needed Veritcal text RE: can you add text to a 3D drawing in a program - dmh - 02-13-2023 11:42 PM Thanks. I'm not exactly sure what this is doing but will give it a go :-) (02-13-2023 12:37 AM)Dougggg Wrote: if you know the angle of the line you could use this to rotate the text RE: can you add text to a 3D drawing in a program - Dougggg - 02-14-2023 03:02 AM it rotates the text, so you would have to have the angle, maybe wont work for your application RE: can you add text to a 3D drawing in a program - jfelten - 02-17-2023 12:21 PM (02-12-2023 11:57 AM)dmh Wrote: I've done a 3D drawing using LINE and I want to label the vertices etc with text. You'll have to manually project the text position from 3D to 2D space by multiplying the position vector by the rotation matrix which you used as input into LINE and then dividing the X and Y components each by the Z component. RE: can you add text to a 3D drawing in a program - dmh - 02-19-2023 01:17 PM That's what I thought (unfortunately). I did a bit of that in a past life but will have another go :-) Thanks! (02-17-2023 12:21 PM)jfelten Wrote:(02-12-2023 11:57 AM)dmh Wrote: I've done a 3D drawing using LINE and I want to label the vertices etc with text. |