POV-Ray : Newsgroups : povray.programming : A thought for 4.0 : Re: A thought for 4.0 Server Time
28 Jul 2024 14:32:24 EDT (-0400)
  Re: A thought for 4.0  
From: mike
Date: 21 Sep 2002 14:00:07
Message: <web.3d8cb2a6b371cc9b349ff7400@news.povray.org>
David McCabe wrote:
>Hello!
>
>I don't know how far you are in the design process for 4.0, but assuming not
>very far at all, I just had an idea that you might like.
>
>Rather then having some weird, limited, language with a lot of code to
>maintain, why not use some full-blown standard scripting language for scene
>description? We could have some API that the user would talk to in order to
>tell POV-Ray what stuff to put in the scene, just as we have language
>directives now.
>
>This has several advantages:
>1. The user gets a real scripting language that can do any kind of
>        calculations or functions or whatever, and can even integrate
>        rendering with other tasks, automating something or other.
>2. The user doesn't have to learn a new language, just a new API.
>3. You get a high-quality interpeter for free. This would greatly reduce
>        the size of POV-Ray, etc.
>
>By choosing a language that has object-oriented features, you allow users
>to do all kinds of fun stuff. At present, we have '.inc' files with
>macros in them to do things. Put if they had classes in them, that
>knew how to do things, such as animating themselves, or interacting
>with others, the door is opened to many interesting and usefull
>possibilities. Imagine describing large scenes in terms of high-level
>objects that interacted and animated themeselves based on internal
>procedures. The possibilities here are great.
>
>But I digress. Of course, that which I have just briefly described could be
>accomplished using a specialized language. The advantage of a normal
>language is that everyone gets stuff for free.
>
>Anyway, my nominations for the language are (in this order):
>
>1. Ruby
>2. Python
>3. Java
>
>Look at his hypothetical Ruby snippet:
>
>
>add Camera.new Vector.new(3,5,-10), Vector.new(0,0,0)
>add PointLightSource.new Vector.new(30,30,-30), White.vector
>add Plane.new x, -2, Texture.new( CheckerPigment(Black.vector,Red.vector) )
>add Sphere.new Vector.new(0,0,0), 2, Texture.new(Yellow.pigment)
>add SkySphere.new( GradientPigment( y, Colormap.new([0,SkyBlue.vector], \
>        [1,Blue.vector])))
>render
>
>
>....Hmm, that looks a bit clunky; we'll try getting rid of the Vectors...
>
>
>add Camera.new 3,5,-10, 0,0,0
>add PointLightSource.new 30,30,-30, White
>add Plane.new x, -2, Texture.new( CheckerPigment(Black,Red) )
>add Sphere.new 0,0,0, 2, Texture.new( ColorPigment(Yellow) )
>add SkySphere.new( GradientPigment( y, [0=>SkyBlue,1=>Blue] ) )
>render
>
>....rather than:
>
>
>camera
>{
>        location <3,5,-10>
>        look_at <0,0,0>
>}
>
>light_source
>{
>        <30,30,-30>,
>        color White
>}
>
>plane
>{
>        x,-2
>        texture
>        {
>                pigment{ checker Black Red }
>        }
>}
>
>sphere
>{
>        <0,0,0>,2
>        texture
>        {
>                pigment{ color Yellow }
>        }
>}
>
>skysphere
>{
>        pigment
>        {
>                gradient y
>                color_map
>                {
>                        [0 color SkyBlue]
>                        [1 color Blue]
>                }
>        }
>}
>
>....Anyway, you get the idea of what it would look like. But it's really
>about being able to do any sort of task or calculation when making the
>scene.
>
>
>Well, maybe you've all just been enlightened with a blinding stroke of
>genius, or maybe someone else has already suggested this, or maybe it's the
>stupidest thing ever. Anyhoo, I thought I'd mention it to you who know more
>than I do. Thanks for listening.
>
>- --
>David McCabe
>http://12.225.144.95/pgpkey
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.0.7 (GNU/Linux)
>
>iD8DBQE9iV801bgGCL1rO04RAtLIAKDJqYTkESKHd36pK3xmkHDvsZy5gwCfc4XC
>jSWQUlpGu/fRVqHJkFZJpKA=
>=ZZQk
>-----END PGP SIGNATURE-----
>

If one wishes to code in any other language all one needs to do is write the
libraires that out put the code in POVSDL. Then you can write your scene
and control pvengine any way you want.

I knwo there are things about POVSDL I would like changed but there is no
other language that truely can replace POVSDL. The idea of useing a
"standard" language would have needed to be made at the start. I already
know POVSDL and whould hate to have to change.

Keep up the very good work on POVRAY. In my opinion it is THE most powerfull
3D system available. In the last few weeks I have had a number of projects
and as I thought about how to do them I could only come to one conclusion.
Povray was the only one that would do it. No other program can handle a 30
meg heightfield ,works well with metaballs or has such a flexable and easy
to learn scripting language.


Post a reply to this message

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