We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I'm looking for books on 3d programming, any suggestions ? I found the one by Ira Greenberg to be easier to understand with less math/equations. Something similar for 3D stuff would be nice; wanted to start with a pipe that goes randomly over the screen.
Answers
I did the pipe thing...
essentially 3D is the same as 2D, just think of an Aquarium instead of a screen...
x is going to the right
y is the height above the ground
z is the depth
PVector is your friend and pushMatrix and popMatrix are his buddies
Some commands come with 3D: sphere, cube of course but also PShape and line() (with 6 parameters instead of 4) and text() (4 params instead of 3)
There is nice tutorial on P3D
Did you look at the books section, eg nature of code is free online
could you post the code if that is handy ? I have been looking at toroid example in book by ira greenberg; but think he's skipped some explanation.
http://openprocessing.org/collection/1190
http://openprocessing.org/sketch/7075
The first link shows a collection with a section for beginners
The 2nd is the pipe sketch
thanks will take a look at that. I'm math noob, a detailed explanation of drawing or rotating around axes(with example) would be useful.
Just read the tutorials on P3D and trigonometry and read the Sketches and play with them
Rotation is measured in radians not degrees
in 3D you can rotate around x axiy, around y and around z axis
this shows you different rotations
2 boxes (gray and red) rotate around their center, one (blue) rotates around another box (red)
you can see that the translations and rotations are isolated from each other. This is achieved by pushMatrix and popMatrix around one block.
More you'll learn from the tutorial on P3D
https://www.processing.org/tutorials/
Best, Chrisir ;-)
I reccomend this
https://thebookofshaders.com/