POV-Ray : Newsgroups : povray.programming : POV-Ray source tutorials? Server Time
28 Jul 2024 18:13:48 EDT (-0400)
  POV-Ray source tutorials? (Message 1 to 7 of 7)  
From: Chris Huff
Subject: POV-Ray source tutorials?
Date: 20 Jun 1999 07:58:01
Message: <376CD841.E22FC493@compuserve.com>
Are there any tutorials or other sources of information on the POV-Ray
source yet? Like how to add a keyword, or explanations of the structure
of the source?


Post a reply to this message

From: Lummox JR
Subject: Re: POV-Ray source tutorials?
Date: 22 Jun 1999 19:00:31
Message: <3770162C.5C87@aol.com>
Chris Huff wrote:
> 
> Are there any tutorials or other sources of information on the POV-Ray
> source yet? Like how to add a keyword, or explanations of the
> structure of the source?

Not that I know of, though I've learned a little bit from working with
it in the few days I've had the source code myself.
To add a keyword, you must do the following:

- Add a token in TOKENIZE.C and PARSE.H, along with the other tokens;
  make sure it goes in the same place in both arrays.
- Add something in one of the Parse_suchandsuch() functions to recognize
  your keyword; there, do any secondary parsing you need, or else
  create a new Parse routine to handle it. (Look through PARSE.C and
  the Superpatch's F_EXPR.C to see what I mean.)

That's all I've learned so far. Not enough for me to create a new
primitive by any means, yet; in fact, I haven't created any new tokens
at all, though I've been tempted.

Lummox JR


Post a reply to this message

From: Ken
Subject: Re: POV-Ray source tutorials?
Date: 22 Jun 1999 19:06:10
Message: <377015F6.E126304F@pacbell.net>
Chris Huff wrote:
> 
> Are there any tutorials or other sources of information on the POV-Ray
> source yet? Like how to add a keyword, or explanations of the structure
> of the source?

  Although I know if nothing currently available Chris Yound did mention
the following in his public message "Plans for Pov v3.1 and Beyond".

1) I will be writing an official technical document that describes the
POV-Ray language from a parser-writer's point of view.  It will include a
grammar specification using the syntax notation in our reference docs.  It
should be helpful to anyone who wants to implement their own parser.


  When he plans to release this to the public I cannot say but it should
prove a useful resource once completed.

-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Chris Huff
Subject: Re: POV-Ray source tutorials?
Date: 22 Jun 1999 20:07:57
Message: <37702658.131497B@compuserve.com>
>1) I will be writing an official technical document that describes the
POV-Ray language from a parser-writer's point of view.  It will include
a
grammar specification using the syntax notation in our reference docs.
It
should be helpful to anyone who wants to implement their own parser.<

That would be useful(although I hate that method of specification, I can
use it.). But what I really need is an explanation of the program source
code, not the scene description language.(There seem to be many
commented forms in the source to describe the various functions, but
most of them are empty!)


Post a reply to this message

From: Jerry
Subject: Re: POV-Ray source tutorials?
Date: 23 Jun 1999 17:12:32
Message: <jerry-2306991412310001@cerebus.acusd.edu>
In <377### [at] compuservecom>, Chris Huff
<Chr### [at] compuservecom> wrote:
>use it.). But what I really need is an explanation of the program source
>code, not the scene description language.(There seem to be many
>commented forms in the source to describe the various functions, but
>most of them are empty!)

I'd recommend going to Ron Parker's web page at
http://www2.fwi.com/~parkerr/traces.html and download his "object bounds"
patch. It is one of the simplest patches I've seen (and also the most
useful for my work); once you've figured out how to install that, you
should have an idea of how to make another simple source patch.

Jerry


Post a reply to this message

From: Ron Parker
Subject: Re: POV-Ray source tutorials?
Date: 23 Jun 1999 17:22:03
Message: <37714ffb@news.povray.org>
On Wed, 23 Jun 1999 14:12:31 -0700, Jerry wrote:
>In <377### [at] compuservecom>, Chris Huff
><Chr### [at] compuservecom> wrote:
>>use it.). But what I really need is an explanation of the program source
>>code, not the scene description language.(There seem to be many
>>commented forms in the source to describe the various functions, but
>>most of them are empty!)
>
>I'd recommend going to Ron Parker's web page at
>http://www2.fwi.com/~parkerr/traces.html and download his "object bounds"
>patch. It is one of the simplest patches I've seen (and also the most
>useful for my work); once you've figured out how to install that, you
>should have an idea of how to make another simple source patch.

It's fine as an example of modifying the tokenizer and the expression
parser, but it doesn't shed much light on the parser in general, or on
the hows and whys of adding textures and objects.

It's also a 3.0-only patch, so it's not even the state of the art (adding
tokens in 3.1 is much simpler.)


Post a reply to this message

From: Jerry
Subject: Re: POV-Ray source tutorials?
Date: 24 Jun 1999 15:24:40
Message: <jerry-2406991224400001@cerebus.acusd.edu>
In article <37714ffb@news.povray.org>, par### [at] fwicom wrote:
>It's fine as an example of modifying the tokenizer and the expression
>parser, but it doesn't shed much light on the parser in general, or on
>the hows and whys of adding textures and objects.

I would recommend starting small...

>It's also a 3.0-only patch, so it's not even the state of the art (adding
>tokens in 3.1 is much simpler.)

Sure, but it is easy to use your 3.0 patch with 3.1. If I could do it,
anyone can.

Jerry


Post a reply to this message

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