We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
projection question (Read 527 times)
projection question
May 4th, 2009, 10:55am
 
Hi,

how can I access and modify the projection matrix within a PGraphics object?

E.g. I have the following code:

Code:

.
// in variable definition section
PGraphics pr_top;
.
.
// in setup
pr_top = createGraphics(pr_top_width,pr_top_height,P3D);
.
.
// in a draw subroutine
pr_top.beginDraw();
pr_top.background(255);
// define projection
// some transformations
// some drawing operations
.
.
pr_top.endDraw();
image(pr_top,pr_top_left_offset,pr_top_top_offset);
.
.


camera() and perspective() do not help here much, because I need a special projection that has the vanishing point behind the camera (object(s) get larger with increasing distance from eye, not smaller as with standard perspective).

Accessing e.g. pr_top.projection.m00 or g.pr_top.projection.m00 did not work. If I know how to access such an element, I can figure out the projection matrix myself.

Thank you very much for your help.

Martin
Re: projection question
Reply #1 - May 14th, 2009, 10:43am
 
Nobody knows an answer?
Page Index Toggle Pages: 1