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.
IndexProgramming Questions & HelpSyntax Questions › accurately placing 3D objects.
Page Index Toggle Pages: 1
accurately placing 3D objects. (Read 285 times)
accurately placing 3D objects.
Feb 18th, 2008, 2:38pm
 
I'm fairly new to processing so there's a fair chance I'm missing a few things here.

What I'm trying to do is lay out a grid of boxes with pixel accuracy. From what I can follow the only way to decide exactly where a box() goes is to translate() to the centre of the box's desired location. Ok, cumbersome but I can live with that however if the width/height of the box is uneven, how the hell am I meant to specify the exact centre? Can I use floating numbers? Won't they just be rounded?
Re: accurately placing 3D objects.
Reply #1 - Feb 18th, 2008, 3:26pm
 
In 3D you can place them using floats, and no rounding occurs. However unless you use smooth(); the on-screen image will be limited to a whole pixel result.

Even with smooth() you may not be able to have even looking spacing.
Re: accurately placing 3D objects.
Reply #2 - Feb 18th, 2008, 3:35pm
 
I might just multiply everything by 10 and zoom the camera out, going to make for some crazy numbers but at least everything will be round.

So the translate/box method is the 'approved' box placement method?
Re: accurately placing 3D objects.
Reply #3 - Feb 18th, 2008, 4:12pm
 
The numbers might be round, but it'll still look exactly the same.

There is no "approved" method, it's just the easiest was of doing it.
Page Index Toggle Pages: 1