POV-Ray : Newsgroups : povray.pov4.discussion.general : A dream about POV4 : A dream about POV4 Server Time
19 Apr 2024 09:47:41 EDT (-0400)
  A dream about POV4  
From: Jaap Frank
Date: 13 Apr 2009 13:03:14
Message: <49e37052@news.povray.org>
Hello to all,

I've read the news posts about a new pov-language, but I'm afraid that we 
forget that there are people who DON'T know how to program and who DON't 
like complicated math. Every time I show povray to someone interested, they 
flee away for this complicated stuff to get a picture. There are times that 
I dream about something easy and fast to script.

So, lets dream:

I want to put a new scripting layer above the existing one. Maybe above an 
upgraded SDL3.7, so we can keep backwards compatibility.

The scene I want to make is a long street with moving cars with a crossroad 
with traffic lights. If everything is there I want to animate this with the 
moving cars.

First we need a camera, so at a new menu with objects I choose a good one 
for my purpose: $$NormalCamera.
What I get is this:

$$NormalCamera

No scripting language but only the reference to it. In a special map there 
are small .inc-files with the SDL for all entries of that new menu.
If pov parses the file it gets its SDL from there. In fact this is calling 
an include-file that describes the object NormalCamera. This camera is made 
with the scripting language and is inserted into the scene before parsing 
it. There is a system to insert or delete items on this menu (Right clicking 
on the choice?) Lets dream on ...
Because the camera position and look_at are not correct for this scene I 
change it into (dimensions are in meters):

$$NormalCamera{
    look_at  $$DodgeCar
    position  $$DodgeCar + <0, 4, -20>
}

I make the camera look at the $$DodgeCar (from the menu too) and position 
the camera behind the car so we move along with the car during the 
animation. What we need are new properties for objects: transport and 
centre_of_mass. Centre_of_mass we need for the position of our object. In 
transport you can put the movement of the object. For instance with a 
spline. The spline returns the centre_of_mass for a particular time.
(What I'm thinking about is an autonomous transport system. For instance: 
follow the car before you and keep a save distance or move at a 50 km/h 
speed, but stops before a traffic light if it's red and so on. Very 
complicated, but maybe it's possible.)

The next thing is light. In my famous menu I choose $$HotSun. HotSun is a 
summer sun at midday. So we have:

$$NormalCamera{           //    it's a camera
    look_at  $$DodgeCar
    position  $$DodgeCar + <0, 4, -20>
}

$$HotSun                         //    it's an array light

Next I choose a crossroad and connecting roads and fit it to my needs :
//  a macro composing the crossroad
$$CrossRoad{
    position <4, 1, 75>
    road_width 5
    pavement{ $$Asphalt }
    pedestrians on
}
//  a macro composing the roads
$$Road{
    position <4, 1, 75>
    length 250
    width 5
    pavement{ $$Asphalt }
    sidewalk on
    rotate -180*y
    translate  -253.5*z
}
$$Road{
    position <4, 1, 75>
    length 250
    width 5
    pavement{ $$Asphalt }
    sidewalk on
    rotate -90*y
    translate  253.5*x
}
$$Road{
    position <4, 1, 75>
    length 250
    width 5
    pavement{ $$Asphalt }
    sidewalk on
    rotate 0*y
    translate  253.5*z
}
$$Road{
    position <4, 1, 75>
    length 250
    width 5
    pavement{ $$Asphalt }
    sidewalk on
    rotate 90*y
    translate  -253.5*x
}
Maybe the extra depth to pass $$Asphalt to the macro is too difficult, but I 
hope it's somehow possible.

I follow with choosing cars from my magic menu (the Dodge, a FordCar, etc.), 
traffic signs and lights and so on ..........

I hope that my line of thoughts are getting through. By exchanging the menu 
items with each other, one can build a library to choose from. I know I make 
it look easy and there are, with no doubt, difficulties to implement this, 
but it could be a start for a new approach.

Have a nice Easter,

Jaap Frank


Post a reply to this message

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