POV-Ray : Newsgroups : povray.binaries.scene-files : New version screen.inc Server Time
28 Mar 2024 16:53:49 EDT (-0400)
  New version screen.inc (Message 11 to 20 of 52)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>
From: SharkD
Subject: Re: New version screen.inc
Date: 17 Nov 2009 20:57:13
Message: <4b035479$1@news.povray.org>
Update.

Seems I was making things a lot harder than they needed to be. I also 
encountered further bugs. The new version of "Get_Screen_XY" is *a lot* 
simpler. The good news is that if you didn't have problems before (i.e. 
you were using "Set_Camera" and perspective projection instead of 
"Set_Camera_Alt" or orthographic projection), then you shouldn't notice 
a difference.

Mike


Post a reply to this message


Attachments:
Download 'screen.inc.txt' (8 KB)

From: Captain Jack
Subject: Re: New version screen.inc
Date: 18 Nov 2009 10:50:18
Message: <4b0417ba@news.povray.org>
"SharkD" <mik### [at] gmailcom> wrote in message 
news:4b035479$1@news.povray.org...
> Update.
>
> Seems I was making things a lot harder than they needed to be. I also
> encountered further bugs. The new version of "Get_Screen_XY" is *a lot*
> simpler. The good news is that if you didn't have problems before (i.e.
> you were using "Set_Camera" and perspective projection instead of
> "Set_Camera_Alt" or orthographic projection), then you shouldn't notice
> a difference.
>
> Mike
>

Cool... I hadn't read through the Get_Screen_XY macro yet, but I did write a 
scene to test it, which I've attached. The macro worked exactly as expected, 
with no errors. The animation itself is of a group of three balls connected 
by springs that float around the screen. I had the program create a text 
file giving the screen coordinates for the center of one of the spheres in a 
format that can be read by Particle Illusion. I Rendered the scene in POV, 
then I imported the text file into PI, then composited the whole thing over 
a background picture, and everything lined up exactly right with no error 
message generated at any point.

In my haste to slap together a test, I made a mistake somewhere in my math 
and the springs don't always line up where the spheres are. I didn't notice 
it until I was playing back the final animation, and it got late enough last 
night that I didn't go back and fix it. The important part was to test the 
macro, and it came through with flying colors.

I put a copy of the rendering up at YouTube, here: 
http://www.youtube.com/watch?v=LzgV8dALdIo.

--
Jack


Post a reply to this message


Attachments:
Download 'TargetTest.pov.txt' (11 KB)

From: SharkD
Subject: Re: New version screen.inc
Date: 18 Nov 2009 21:27:57
Message: <4b04ad2d$1@news.povray.org>
On 11/18/2009 10:51 AM, Captain Jack wrote:
> I put a copy of the rendering up at YouTube, here:
> http://www.youtube.com/watch?v=LzgV8dALdIo.

Cool. I've been using it to render illustrations in POV-Ray, and then 
create markers and text on top of it in GeoGebra.

Mike


Post a reply to this message

From: Captain Jack
Subject: Re: New version screen.inc
Date: 19 Nov 2009 09:29:21
Message: <4b055641$1@news.povray.org>
"SharkD" <mik### [at] gmailcom> wrote in message 
news:4b04ad2d$1@news.povray.org...
> On 11/18/2009 10:51 AM, Captain Jack wrote:
>> I put a copy of the rendering up at YouTube, here:
>> http://www.youtube.com/watch?v=LzgV8dALdIo.
>
> Cool. I've been using it to render illustrations in POV-Ray, and then 
> create markers and text on top of it in GeoGebra.
>
> Mike

And, just for the sake of completeness if anyone else is reading this, I 
fixed the spring macro, using a macro from transforms.inc:

#macro Spring(Base_Point, Top_Point, Spring_Radius, Turns, Wire_Radius, 
Length_Scale)
    #local Length = vlength(Top_Point - Base_Point);
    #local Points = 4*Turns + 3;
    #local Arm_Delta = (Length/Length_Scale) / (4*Turns);
    #local Arm_Offset = -Arm_Delta;
    #local Arm_Rotation = 0;
    sphere_sweep {
        b_spline
        Points
        #local Counter = 0;
        #while (Counter < Points)
            , vrotate(Spring_Radius*x, Arm_Rotation*y) + Arm_Offset*y, 
Wire_Radius
            #local Arm_Offset = Arm_Offset + Arm_Delta;
            #local Arm_Rotation = mod(Arm_Rotation + 90, 360);
            #local Counter = Counter + 1;
        #end
        scale Length_Scale*y + (x + z)
        Point_At_Trans(Top_Point - Base_Point)
        translate Base_Point
        bounded_by {
            cylinder {
                -Wire_Radius*y,
                (Length+Wire_Radius)*y,
                Spring_Radius+Wire_Radius
                Point_At_Trans(Top_Point - Base_Point)
                translate Base_Point
                }
            }
        }
#end


Post a reply to this message

From: Ellef Fange Gjelstad
Subject: Re: New version screen.inc
Date: 17 Aug 2010 11:15:01
Message: <web.4c6aa70eb4b005963d51a7b10@news.povray.org>
I am getting error messages like this:

File: /home/ellef/lang/pov-ray/inc//myScreen.inc  Line: 111
File Context (5 lines):
  #local val_3 = vinv_transform(Loc, Camera_Transform_All);
  <
Parse Error: Expected 'object or directive', < found instead


What am I doing wrong?


I am trying to add labels and help lines to geometrical figures (See
povray.newusers thread "Labels on geometrical figures").  It would be nice to do
that too entirely inside Pov-ray.


Post a reply to this message

From: SharkD
Subject: Re: New version screen.inc
Date: 17 Aug 2010 19:18:07
Message: <4c6b18af@news.povray.org>
On 8/17/2010 11:13 AM, Ellef Fange Gjelstad wrote:
>
> I am getting error messages like this:
>
> File: /home/ellef/lang/pov-ray/inc//myScreen.inc  Line: 111
> File Context (5 lines):
>    #local val_3 = vinv_transform(Loc, Camera_Transform_All);
>    <
> Parse Error: Expected 'object or directive',<  found instead
>
>
> What am I doing wrong?
>
>
> I am trying to add labels and help lines to geometrical figures (See
> povray.newusers thread "Labels on geometrical figures").  It would be nice to do
> that too entirely inside Pov-ray.
>
>
>

Please post the entire scene.

-- 
http://isometricland.com


Post a reply to this message

From: Ellef Fange Gjelstad
Subject: Re: New version screen.inc
Date: 18 Aug 2010 10:10:00
Message: <web.4c6be990b4b005963d51a7b10@news.povray.org>
After some struggle, I have made a minimal example which works.  Thanks to
Captain Jack for TargetTest.pov (and of course to SharkD, this is a really cool
feature).

Maybe some might be interested in the "minimal" example, so I post it here.

So now, it is just to connect this to SVG, imageMagick and make, and we have a
general tool :)


Post a reply to this message


Attachments:
Download 'screenminimal.pov.txt' (2 KB)

From: Ellef Fange Gjelstad
Subject: Re: New version screen.inc
Date: 18 Aug 2010 10:15:01
Message: <web.4c6bea4fb4b005963d51a7b10@news.povray.org>
After some struggle, I have made a minimal example which works.  Thanks to
Captain Jack for TargetTest.pov (and of course to SharkD, this is a really cool
feature).

Maybe some might be interested in the "minimal" example, so I post it here.

So now, it is just to connect this to SVG, imageMagick and make, and we have a
general tool :)


Post a reply to this message

From: SharkD
Subject: Re: New version screen.inc
Date: 18 Aug 2010 19:55:26
Message: <4c6c72ee$1@news.povray.org>
On 8/18/2010 10:09 AM, Ellef Fange Gjelstad wrote:
> After some struggle, I have made a minimal example which works.  Thanks to
> Captain Jack for TargetTest.pov (and of course to SharkD, this is a really cool
> feature).
>
> Maybe some might be interested in the "minimal" example, so I post it here.
>
> So now, it is just to connect this to SVG, imageMagick and make, and we have a
> general tool :)

It would be cool if there were a library of macros that created 
SVG-equivalent shapes in POV. Might be a nice little project for someone 
who has the time.


-- 
http://isometricland.com


Post a reply to this message

From: posfan12
Subject: Re: New version screen.inc
Date: 19 Jan 2016 00:55:01
Message: <web.569dcf40b4b005965dbf06e80@news.povray.org>
Here's an updated version. It uses a new macro, Set_Camera_Orthographic, to
toggle orthographic mode on/off. Otherwise, the script will not be compatible
with old scenes made prior to this script.


Mike


Post a reply to this message


Attachments:
Download 'screen_new.inc.txt' (8 KB)

<<< Previous 10 Messages Goto Latest 10 Messages Next 10 Messages >>>

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