POV-Ray : Newsgroups : povray.text.tutorials : New tutorial about 2D screen coordinates : Re: New tutorial about 2D screen coordinates Server Time
4 Oct 2024 05:19:11 EDT (-0400)
  Re: New tutorial about 2D screen coordinates  
From: Kenneth
Date: 31 Aug 2018 23:20:01
Message: <web.5b8a04593848ca56a47873e10@news.povray.org>
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.'


Post a reply to this message

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