 |
Author |
Topic: translate Z-axis with cameraMode(ORTHOGRAPHIC) ? (Read 359 times) |
|
mKoser

|
translate Z-axis with cameraMode(ORTHOGRAPHIC) ?
« on: Sep 20th, 2004, 10:02pm » |
|
i am some stuff in 3D which I need to display in ORTHOGRAPHIC mode, and this feature works just fine! however, when i try to translate(x, y, z) the Z-axis translation is ignored I am guessing it's to do with the inner-workings og the ORTHOGRAPHIC cameraMode. Is there another way to do this? Should I alter the camera itself? (I seem to remember Ariel Malka doing an example of changing the camera-settings!) Any thoughts? + mikkel
|
mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
|
|
|
arielm
|
Re: translate Z-axis with cameraMode(ORTHOGRAPHIC)
« Reply #1 on: Sep 21st, 2004, 12:03am » |
|
hmm, t'was a bright day at the end of may 2003, i started a loop() followed by something like: Code:beginCamera(); ortho(-100 ,100, -100, 100, 100, -100); rotateX(radians(15)); rotateY(radians(45)); endCamera(); box(100); |
| did it help with z-axis? i think so but my memory could just be wrong (or maybe it was a very early version of p5 anyway?..)
|
« Last Edit: Sep 21st, 2004, 12:04am by arielm » |
|
Ariel Malka | www.chronotext.org
|
|
|
mKoser

|
Re: translate Z-axis with cameraMode(ORTHOGRAPHIC)
« Reply #2 on: Sep 21st, 2004, 12:57am » |
|
hi ariel, thanks for that ... it was the ortho() command i was looking for! but.... it still doesn't solve my translate z-axis problem, the z-axis is still ignored! * i might solve it using the scale() method .. hmm! Code: void setup(){ size(300, 300); } void loop(){ background(255); beginCamera(); ortho(-100 ,100, -100, 100, 100, -100); endCamera(); rotateX(radians(15)); rotateY(radians(45)); translate(0, 0, mouseY); scale(mouseX/100f); box(100); } |
| thanks for your help! + mikkel
|
mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
|
|
|
fry
|
Re: translate Z-axis with cameraMode(ORTHOGRAPHIC)
« Reply #3 on: Sep 21st, 2004, 2:37am » |
|
what are you expecting the z axis to do? things aren't gonna get smaller (since it's ortho), though they'll get farther away.. is it not working? you'll have to rotate things to get anything interesting to happen in ortho.
|
|
|
|
mKoser

|
Re: translate Z-axis with cameraMode(ORTHOGRAPHIC)
« Reply #4 on: Sep 21st, 2004, 1:43pm » |
|
well, i was expecting objects to become smaller when translating them on the z-axis, but i realize now that i wasn't 100% sure of what it means to see things in ortho-view!... everything seems to be working just fine - except my head ofcourse, which is learning new stuff about view-modes!
|
mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
|
|
|
|