POV-Ray : Newsgroups : povray.text.tutorials : New tutorial about 2D screen coordinates : Re: New tutorial about 2D screen coordinates Server Time
29 Feb 2024 04:13:46 EST (-0500)
  Re: New tutorial about 2D screen coordinates  
From: Mike Horvath
Date: 1 Sep 2018 07:08:57
Message: <5b8a7349$1@news.povray.org>
On 8/31/2018 11:15 PM, Kenneth wrote:
> Mike Horvath <mik### [at] gmailcom> wrote:
>> I just created a new tutorial about how to calculate very precise values
>> for the 2D screen coordinates of objects in a POV-Ray render.
> That is very cool! I'm already trying to think of other offbeat uses for it.
> Just a suggestion (truly off the top of my head): Would it be possible in some
> way to incorporate some of the complex-looking SCENE code (in your wiki example)
> into an 'additional' #macro or .inc file, that could then 'call' the new
> Screen.inc? (Assuming that those parts are 'generic' for any scene.) If I'm
> correctly grasping your wiki example from a 'first look', there are currently
> some required scene code entries like...
> #local TempAngle = pi/2 - atan(1/cos(pi/4));
> #local TempTrans = transform
> {
>   rotate  +x * 45
>   rotate  +z * degrees(TempAngle)
>   translate +y * sin(TempAngle)
>   translate +y * 1/10
> }
> ....and
> #local SphereLoc_1 = vtransform(-x, TempTrans);  [etc.]
> I'm wondering if this stuff could be 'hidden' from the user (within the
> additional macro or inc file), so that the only actual scene code required would
> be  something like...
> #local ScreenLoc_1 = Get_Screen_XY(SphereLoc_1);
> sphere {SphereLoc_1, 0.1 pigment {Cyan}}
> Sorry if my idea seems too simplistic (or just dumb!), but it's my first thought
> on seeing the wiki's example code and its 'apparent' complexity. Maybe I'm not
> yet grasping which scene code elements are truly part of the 'main idea.'

I could replace the "hedgehog" with something simpler, such as a box or 
pyramid. Thanks for the suggestion!


Post a reply to this message

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