POV-Ray : Newsgroups : povray.general : 4.0 Feature discussion : Re: 4.0 Feature discussion Server Time
9 Aug 2024 11:26:03 EDT (-0400)
  Re: 4.0 Feature discussion  
From: Chris Huff
Date: 15 Nov 2000 16:10:43
Message: <chrishuff-3AB819.16105615112000@news.povray.org>
In article <8FE### [at] povrayorg>, ing### [at] homenl (ingo) wrote:

> In the several discussions there where on this OO-pov topic, there is one 
> thing I don't understand, or maybe it's my ignorance; Why design a new 
> language? Why not pick a suitable, already existing OO-language with 
> everything on it and write the appropriate modules, classes etc.? 

So you can have a language designed for the purpose of describing scenes 
and without the "baggage" from languages designed for other purposes 
(text processing, application development, web applets, etc...).
Things like vectors, colors, textures, and shapes as part of the 
language instead of classes in a library for the language, etc.
A language designed for scene description can be simplified and easier 
to learn, as well as better for hand-coding scenes. Also, you can make 
it completely platform independant without having to pound someone 
else's source into submission. :-)

A library for another language that outputs .pov files or tells POV to 
render a scene would still be very useful, it just has some shortcomings 
for writing scenes...


> Python & POV:
> http://www.inetarena.com/~pdx4d/ocn/cp4e.html#python
> 3D Python:
> http://virtualphoton.pc.cc.cmu.edu/projects/visual/ 
> (Chris, a mac (alpha)version is now available)

I will look at these... I haven't really liked what I have seen of 
Python, at least not for POV. For instance: the animation of a ball 
bouncing on a box uses this code(some indentation added):

from visual import *

floor = box (pos=(0,0,0), length=4, height=0.5, width=4, 
color=color.blue)
ball = sphere (pos=(0,4,0), radius=1, color=color.red)
ball.velocity = vector(0,-1,0)
dt = 0.01

while 1:
    rate (100)
    ball.pos = ball.pos + ball.velocity*dt
    if ball.y < ball.radius:
        ball.velocity.y = -ball.velocity.y
    else:
        ball.velocity.y = ball.velocity.y - 9.8*dt


I can't imagine many POV users being happy programming scenes like this, 
though some specific things would be useful in a scene description 
language. Oh, and I didn't cut off the end...but the lack of some kind 
of end to the while loop makes me nervous.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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