POV-Ray : Newsgroups : povray.general : How about $ for declare? Server Time
2 Aug 2024 16:23:30 EDT (-0400)
  How about $ for declare? (Message 1 to 10 of 37)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Stefan Viljoen
Subject: How about $ for declare?
Date: 13 Aug 2004 15:42:40
Message: <411d19af@news.povray.org>
Hi guys

Megapov 0.7 (I heard) had $ instead of #declare...

What is the reason why this wasn't implemented in official Pov 3.1 or 3.5?

Seems like a very nice feature to just go $variablename instead of #declare
all over in a .pov file. Quicker to type, easier to read, and so on.

Any team guys? Christoph?
-- 
Stefan Viljoen
Software Support Technician
Polar Design Solutions


Post a reply to this message

From: Christoph Hormann
Subject: Re: How about $ for declare?
Date: 13 Aug 2004 17:35:01
Message: <cfjc1l$vh2$1@chho.imagico.de>
Stefan Viljoen <rylan@ wrote:
> Hi guys
> 
> Megapov 0.7 (I heard) had $ instead of #declare...
> 
> What is the reason why this wasn't implemented in official Pov 3.1 or 3.5?
> 

It leads to awfully obfuscated code.  When designing a new language the 
idea to leave away the #declare (or whatever else) completely is 
reasonable.  But if it is required replacing it with a single character 
is not a good idea.  With the same arguments you could replace every 
other keyword with the shortest unique abbreviation - but no one could 
read the code any more then.

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 06 Jul. 2004 _____./\/^>_*_<^\/\.______


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: How about $ for declare?
Date: 13 Aug 2004 18:17:32
Message: <Xns954536876C74raf256com@203.29.75.35>
chr### [at] gmxde news:cfjc1l$vh2$1@chho.imagico.de

> other keyword with the shortest unique abbreviation - but no one could 
> read the code any more then.

Btw, how about adding some shorten forms for long and often used keywords, 
it could spedd up typing and comforable level of hand-typing .pov code, 
like

light { y*10 rgb 1 }
diff {
  box { -5, +5 }
  sphere { 0 10 }
  text { 
  pig { bozo cmap{0:<1,0,0> .5:<1,1,0> 1:1} } 
  norm{ bozo .5 }  
  fin { refl .5 phong 0.5,70 spec 0.1,0.06 }
}

?

Aliasing keyword is probably easy, another format of for example color_map 
perhaps not so much.

Just an idea.

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Samuel Benge
Subject: Re: How about $ for declare?
Date: 13 Aug 2004 18:57:36
Message: <411D46BF.4050809@hotmail.com>
Rafal 'Raf256' Maj wrote:

> chr### [at] gmxde news:cfjc1l$vh2$1@chho.imagico.de
> 
> 
>>other keyword with the shortest unique abbreviation - but no one could 
>>read the code any more then.
>>
> 
> Btw, how about adding some shorten forms for long and often used keywords, 
> it could spedd up typing and comforable level of hand-typing .pov code, 
> like

Better yet, why not have the ability to make new #aliases for keywords. 
Something like this:

#alias sphere=sph;

sph{ <0,0,0>, 10 pigment{White} }

-Sam


Post a reply to this message

From: Alain
Subject: Re: How about $ for declare?
Date: 13 Aug 2004 19:07:44
Message: <411d49c0$1@news.povray.org>
Rafal 'Raf256' Maj nous apporta ses lumieres ainsi en ce 13/08/2004 
18:17... :

>chr### [at] gmxde news:cfjc1l$vh2$1@chho.imagico.de
>
>  
>
>>other keyword with the shortest unique abbreviation - but no one could 
>>read the code any more then.
>>    
>>
>
>Btw, how about adding some shorten forms for long and often used keywords, 
>it could spedd up typing and comforable level of hand-typing .pov code, 
>like
>
>light { y*10 rgb 1 }
>diff {
>  box { -5, +5 }
>  sphere { 0 10 }
>  text { 
>  pig { bozo cmap{0:<1,0,0> .5:<1,1,0> 1:1} } 
>  norm{ bozo .5 }  
>  fin { refl .5 phong 0.5,70 spec 0.1,0.06 }
>}
>
>?
>
>Aliasing keyword is probably easy, another format of for example color_map 
>perhaps not so much.
>
>Just an idea.
>
>  
>
You can create a shorthand.inc include that define those abreviations as 
equivalant to whatever keyword you want. You even can translate every 
keyword to another language if you feel like it. If you then publish 
your scene, don't forget to also publish the include file(s).

Alain


Post a reply to this message

From: Rafal 'Raf256' Maj
Subject: Re: How about $ for declare?
Date: 13 Aug 2004 19:48:12
Message: <Xns954512C7765Araf256com@203.29.75.35>
aze### [at] qwertygov news:411d49c0$1@news.povray.org

> You can create a shorthand.inc include that define those abreviations as 
> equivalant to whatever keyword you want. You even can translate every 
> keyword to another language if you feel like it. If you then publish 
> your scene, don't forget to also publish the include file(s).
> 

Uhm? How exacly does it work? Sounds very interesting... something simmilar 
to what Samuel was talking about?

-- 
http://www.raf256.com/3d/
Rafal Maj 'Raf256', home page - http://www.raf256.com/me/
Computer Graphics


Post a reply to this message

From: Alain
Subject: Re: How about $ for declare?
Date: 13 Aug 2004 20:46:01
Message: <411d60c9$1@news.povray.org>
Rafal 'Raf256' Maj nous apporta ses lumieres ainsi en ce 13/08/2004 
19:48... :

>aze### [at] qwertygov news:411d49c0$1@news.povray.org
>
>  
>
>>You can create a shorthand.inc include that define those abreviations as 
>>equivalant to whatever keyword you want. You even can translate every 
>>keyword to another language if you feel like it. If you then publish 
>>your scene, don't forget to also publish the include file(s).
>>
>>    
>>
>
>Uhm? How exacly does it work? Sounds very interesting... something simmilar 
>to what Samuel was talking about?
>
>  
>
Something like:

#declare sph=sphere; //Abreviate sphere to sph
#declare boite=box; //Translate box to boite (french)

Alain


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: How about $ for declare?
Date: 13 Aug 2004 23:33:31
Message: <411d880b@news.povray.org>
Cool idea!

--
- Nicolas Alvarez
nicoalvar0 [at] hotmail [dot] com


news:411### [at] hotmailcom...
> Rafal 'Raf256' Maj wrote:
>
> > chr### [at] gmxde news:cfjc1l$vh2$1@chho.imagico.de
> >
> >
> >>other keyword with the shortest unique abbreviation - but no one could
> >>read the code any more then.
> >>
> >
> > Btw, how about adding some shorten forms for long and often used
keywords,
> > it could spedd up typing and comforable level of hand-typing .pov code,
> > like
>
> Better yet, why not have the ability to make new #aliases for keywords.
> Something like this:
>
> #alias sphere=sph;
>
> sph{ <0,0,0>, 10 pigment{White} }
>
> -Sam
>


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: How about $ for declare?
Date: 13 Aug 2004 23:35:01
Message: <411d8865@news.povray.org>
The idea of using #alias is better so that you don't mix #declares with
abbreviations.

--
- Nicolas Alvarez
nicoalvar0 [at] hotmail [dot] com



news:411d60c9$1@news.povray.org...
> Rafal 'Raf256' Maj nous apporta ses lumieres ainsi en ce 13/08/2004
> 19:48... :
>
> >aze### [at] qwertygov news:411d49c0$1@news.povray.org
> >
> >
> >
> >>You can create a shorthand.inc include that define those abreviations
as
> >>equivalant to whatever keyword you want. You even can translate every
> >>keyword to another language if you feel like it. If you then publish
> >>your scene, don't forget to also publish the include file(s).
> >>
> >>
> >>
> >
> >Uhm? How exacly does it work? Sounds very interesting... something
simmilar
> >to what Samuel was talking about?
> >
> >
> >
> Something like:
>
> #declare sph=sphere; //Abreviate sphere to sph
> #declare boite=box; //Translate box to boite (french)
>
> Alain


Post a reply to this message

From: Samuel Benge
Subject: Re: How about $ for declare?
Date: 13 Aug 2004 23:42:25
Message: <411D8980.2020009@hotmail.com>
Alain wrote:

> Something like:
> 
> #declare sph=sphere; //Abreviate sphere to sph
> #declare boite=box; //Translate box to boite (french)
> 
> Alain

Well, that's good to know!

-Sam


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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