help-3dldf
[Top][All Lists]
Advanced

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

[help-3dldf] Re: Your FEATPOST website


From: Laurence Finston
Subject: [help-3dldf] Re: Your FEATPOST website
Date: Sun, 12 Dec 2004 18:43:36 +0100
User-agent: IMHO/0.98.3+G (Webmail for Roxen)

From: "L. Nobre G." <address@hidden> 

> > start_metapost;
> > %% [...] Raw MetaPost code.
> > end_metapost;
> >
> > If you want this, I'll do it.  It shouldn't take long.

> I want this.

Okay.  I'll let you know when it's done.  You should be aware, though, that
drawing and filling commands in 3DLDF cause no output to the MetaPost file.  
That only happens when `output <picture>' or `endfig' is invoked.  So if you
want to write raw MP code to the output file between drawing commands, you
will have to call `output' explicitly beforehand and then possibly clear the
`picture'.

> > Having the parser recognize invalid constructions by itself would not
work.

> Then we're left with the problem of passing variables back and forth.
> You already explained why it is difficult to parse MP code, so it is
> difficult to pass variables from MP to 3DLDF, but how difficult would it
> be to just pass variables from 3DLDF to MP like:

> start_metapost( MPpathX = 3DLDFpathY, MPpairZ = 3DLDFpairA, etc );
> %% [...] Raw MetaPost code using MPpathX, MPpairZ, etc.
> draw MPpathX--MPpairZ dashed evenly; %% for instance
> end_metapost;

> ?

Passing values explicitly, i.e., as strings, would be easy.  
Passing anything that requires parsing would require a different 
approach, but it would be possible.  In this case, I would write rules
that cause output to the MP file, i.e., they would be valid constructions 
in the 3DLDF language.  Currently, the only things output to the MP file are
some comments, `beginfig', `endfig', `end', and drawing and filling 
commands.  However, I could write anything to the MP file:  
variable declarations, assignments, equations, etc.

> > It would,
> > however, be easy to write parser rules for having 3DLDF write MetaPost
code
> > that accesses your macros, if this was useful.

> I don't think so. If my macros were reimplemented in 3DLDF, they would
> work much better, because of the arithmetic engine. That's why I want to
> use 3DLDF.

You do know that I haven't implemented equations yet, so that
assignments must be used?  I'd like to implement equations, but I think 
it will be quite difficult.  In addition, most programming languages
get along without them, so it's not that high on my priority list.

Macros are high on my priority list, but I want to release a new
stable version before I start working on them.  I don't think they will be
hard to implement.  I believe I can use a technique similar to the one I've
used for loops.  I think I will also be able to implement `vardefs' with a
reasonable amount of effort.  I think `primarydef', `secondarydef', and
`tertiarydef' will be a bit more difficult.

The main hurdle I have to overcome before I release the next version is
rewriting the manual.  As I work on it, I find things that I have to add,
change, or fix in the program.   I've also spent the last few days working on
the functions and rules for reflecting objects in or off of planes, and it's
turned out to be more work than I expected.  I wanted to include these
features in the new version, but I may not, after all.

Laurence




reply via email to

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