POV-Ray : Newsgroups : povray.newusers : Calculate the camera position automatic : Re: Calculate the camera position automatic Server Time
30 Jul 2024 20:30:01 EDT (-0400)
  Re: Calculate the camera position automatic  
From: JC (Exether)
Date: 8 Sep 2003 07:41:24
Message: <3f5c6ae4@news.povray.org>
Using the max/min_extend functions seems to be the correct way to do it, 
I would then center it, and compute the camera position according to the 
size of the object, but I don't expect a lot of calculations for that. 
You should be able to set a correct position with a few test and tries.
You can also have a fixed camera and scale your objects to fit in a 
given box, for example box { -1, 1 }, you would have to find their 
biggest dimension and then scale that dimension to the box.

I hope that helps,

JC (Exether)


> Hi
> 
> i have an object which i don't know the dimensions (created by an external
> script) Now i want to show this object as full image (to fill most of the
> image but nothing of the object should be hidden) and so I have to
> automaticly calculate the position of the camera. How can i do this? I think
> i can do this using max_extend and min_extend. But how without a lot of
> calculations? Is there an easy way?
> 
> Setting the camera manually is not an option. I have about 500 of this
> objects and they are all different.
> It is for my converter from Eagle (a PCB layout programm) to POVRay.
> 
> 
> --

> mat### [at] matweide
> http://www.matwei.de
> 
> 
> 
>


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.