POV-Ray : Newsgroups : povray.general : a little ray tracer : Re: a little ray tracer Server Time
6 May 2026 08:20:58 EDT (-0400)
  Re: a little ray tracer  
From: Bald Eagle
Date: 5 May 2026 09:05:00
Message: <web.69f9ea7a1235ce789839f6ab25979125@news.povray.org>
ingo <ing### [at] nomailcom> wrote:
> .... Everything else is SQL. Image is a query, depthmap
> is a query, normalmap is a query ...

Perhaps you could take a bit of time to explain how the parser gets handled.

clipka's major concern was fixing/refactoring the parser.
I know that we have a special, hand-written parser that's not like most
languages.

If I understand all of it correctly, we have

A raw tokenizer
A tokenizer
A scanner
A parser
and then handling of objects, symbol tables, functions, textures, etc.

I don't really understand all the grammar, lexemes, syntax vs semantics, symbol
tables, etc. that go into building a language, and I think it would help if we
dedicated a few threads to discussing these aspects of the source, so that we
can better understand what we HAVE, and plan out a path to where we want/need to
be.

Writing out some code that just goes through the motions but doesn't implement
anything would give people an idea about the roadmap that constitutes how the
raytracer works overall, and I think a high-level pseudocode version would be a
great way to help organize all of the various parts.

We have redundant code, things that are intertwined in the parser that ought not
be there, and various algorithms that get applied to different shapes as part of
the bounding (bsp, cylinder bounding, AABB, sphere bounding).

If we rearranged the code at a high level, and made extensive comments about WHY
the parts of the code ought be in the places we're putting them, then that would
be a big step forward in filling in the place-holder stuff with actual code.

We already have the code base, so we can just copy-paste a lot of what already
exists, and then it would be a matter of making all of the various parts work
together.  We can make it modular, add much-needed comments and references,
standardize some of the math and constants used (epsilons), etc.

This would also be a good class on writing patches and compiling source code, so
that more people can understand how to make POV-Ray vX.Y.Z

- BW


Post a reply to this message

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