Alright, thank you very much then it sounds like its time to learn 3D, because 3D rotations make no sense to me (and that sphere code that keeps popping up confuses me to no end). And @Ignatz, you should start a thread that just has a link to your ebooks, I keep fishing around the forums for the links
@Monkeyman32123 - all my eBooks are here
https://www.dropbox.com/sh/mr2yzp07vffskxt/AACqVnmzpAKOkNDWENPmN4psa
And just for you, I have one for 3D. I recommend reading it to avoid the pain I went through learning it, especially the way the axes are all messed up.
@Monkeyman32123 Not sure what you’re going to do with 3D lines, but here a way of drawing 2D lines in a 3D space. Of course when they’re rotated a certain way, they disappear.
function setup()
parameter.number("rot",-180,180,70)
parameter.number("eyeX",-300,300,150)
parameter.number("eyeY",-300,300,0)
parameter.number("eyeZ",-300,300,60)
end
function draw()
background(0, 0, 0, 255)
perspective(90)
camera(eyeX,eyeY,eyeZ,0,0,0,0,1,0)
rotate(rot,0,1,0)
strokeWidth(4)
stroke(255,0,0)
fill(255, 0, 0)
text("-x",-50,0) -- draw -x
text("+x",50,0) -- draw +x
line(-40,0,40,0) -- draw line
text("dave1707",0,100)
stroke(0,0,255)
fill(0,0,255)
text("-y",0,-50) -- draw -y
text("+y",0,50) -- draw +y
line(0,-40,0,40) -- draw line
scale(5,5,5)
end
The user and all related content has been deleted.
Thank you @dave1707, wonderful bit of code, though unfortunately not quite what I’m looking for, so it seems the stretchy box is the solution I’ll have to use. Beautiful for other things, though!idea gears turning