POV-Ray : Newsgroups : povray.general : Pov 4.00 question : Re: Possible POV Object Scheme (was Re: Pov 4.00 question) Server Time
7 Aug 2024 03:16:26 EDT (-0400)
  Re: Possible POV Object Scheme (was Re: Pov 4.00 question)  
From: Nekar Xenos
Date: 14 Feb 2002 07:17:32
Message: <3c6baadc@news.povray.org>

news:3C6### [at] webconde...
> Warp wrote:
>
> >
> >   I don't understand why it would be "more powerful" and "cleaner" with
> > no '{'s and '#'s.
> >   Specially the lack of '{'s would make it uglier and harder to write and
> > read.
> >   (No, I *DON'T* want to start writing 'begin' and 'end' like in Pascal.)
> >
> >
>
> may I throw in my $.02 on this?
>
> do you know the haskell (funcitonal) programming language?
>
>
> they use a indentation rule to figure out when a statement belongs to
> a block. As long as you indent new lines more than the line that
> started the block, the compiler knows you want to stay within that
> block. As soon as you indent lesser, it adds a implicit "}".
> Works great.
>
> For povray SDL this whould mean:
>
> object sphere
>    <0 0 1> 1.0
>    texture
>       pigment colour rgb(1, 1, 0)
>       finish ambient 0.2
>              diffuse 0.6
>              metallic
>
> camera location <0 0 0>
>         look_at <0 0 1>
>

IMHO it's not all that practical. If you have lot's of nested loops and CSG you
could spend more time scrolling left and right than it would take to type in
'{'. It could get quite confusing. I would rather just do away with the #'s.

--
#local X=20*<-2,2,5>;#local K=2*z*X-X;#local R=seed(frame_number);blob{#while(K
.x>X.x)#local N=X+<rand(R)rand(R)1>/3;#local X=(vlength(N-K)<vlength(X-K)?N:2*X
-N);sphere{X,1,1rotate z*90}sphere{X,1,1}#end pigment{rgbt 1}interior{media{
emission<2,4,5>*5}}hollow scale.05}//   http://nekar_xenos.tripod.com/metanoia/
sphere_sweep{catmull_rom_spline 6<-8,-8>1<-8,-8>1<-8,8>1<8,-8>1<8,8>1<8,8>1
translate 20*z pigment{gradient z scale 3color_map{[0rgb<0,9,18>][1rgb 0]}}}


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.323 / Virus Database: 180 - Release Date: 2002/02/08


Post a reply to this message

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