POV-Ray : Newsgroups : povray.off-topic : SPAAAAACCCEEEE : Re: SPAAAAACCCEEEE Server Time
29 Jul 2024 12:19:19 EDT (-0400)
  Re: SPAAAAACCCEEEE  
From: clipka
Date: 23 Mar 2012 21:45:27
Message: <4f6d2737$1@news.povray.org>
Am 23.03.2012 19:22, schrieb Le_Forgeron:

>> We definitely need custom-projection warps and cameras. You know, with
>> functions defining the projection.
>
> For custom-camera, you would need a way to output 2 vectors (origin,
> direction) from the inputs of 4 vectors (location, up, right,
> direction), 2 doubles between 0 and 1, and whatever you do with them as
> hard-coded/SDL-coded formulas (including other SDL data and hard-coded
> values).(you might see it as a function of 2 doubles which must provides
> 2 3D-vectors)

Not really.

The location, up, right & direction vectors just orient the camera; 
that's a simple matrix operation that is independent of the projection 
formula.

For a truly generic projection we'd need six funcions, each taking two 
numbers (X and Y coordinate in resulting image): Ray origin X,Y,Z and 
ray direction X,Y,Z.

For any cartographic projection, two functions would suffice: From two 
screen coordinates (X,Y) we'd have to compute two spherical coordinates 
(phi and theta).

> Did you say projection warps ? I would have thought about projection
> map_type.  (from a 3D point, some others data (assume origin&  other ?),
> provide a couple of doubles : integer part can be used to isolate the
> "once" (0.x,0.y) and the part after the dot is the coordinate on
> map/picture (scale to 0 to 1 in both direction)

Map types can only be used with input images; implementing the stuff as 
a custom warp instead would allow to do the same operations on other 
patterns as well.


Post a reply to this message

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