|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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)
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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)
|
|
| |
| |
|
|
|
|
| |