help-bison
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

3DLDF


From: Hans Aberg
Subject: 3DLDF
Date: Thu, 12 Aug 2004 23:19:25 +0200

I had a look at your 3DLDF manual:

On chapter 2: I am not sure how you avoid a polymorphic system when
developing a Bison parser. Given from what you write there, an obvious way
would be to derive all your geometric object classes from a root class
object_root, with a polymorphic calls object. The parser semantic value
then contains a
    object object_;
as I described earlier.

The Bison grammar then will contain things like:
  point:
    "(" coordinate "," coordinate "," coordinate ")" {
      $$ = new Point($1, $2, $3);
    }
  ;
if the syntax of a point in your program is (x_1, x_2, x_3). It is then
easy to add the different operations and types you have to your system.
(But I am not sure how your C++ code produces an output.)

>From what I have seen of what your program can do, you might decide to
invent your own syntax which the best expresses the things your program can
do.

For n-D modelling (in n dimensions), I think one can use the higher
dimensional equivalent of Bezier (spline curves): maps
    f: sigma^n -> R^n
where sigma is the n-dimensional simplex, and where the coordinate
projection coordinates of f are degree 3 polynomials. These simplicies must
then be glued together at the lower dimensional subsimplicies, which then
also are parametrized by degree 3 polynomials.

(In section 1.4: You speak about real values, but probably mean floats
(floating point values). And you have a sentence (second below):
  In the following, it may be a little unclear why I sometimes refer to
Metafont
  and sometimes to MetaPost. The reason is that Metafont inherited much of its
  functionality from Metafont.
Also, why has MetaPost an inner uppercase letter, when Metafont does not?)

  Hans Aberg






reply via email to

[Prev in Thread] Current Thread [Next in Thread]