To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.cad.devOpen lugnet.cad.dev in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 CAD / Development / 8798
8797  |  8799
Subject: 
Re: Use of arbitrary elements with LSynth
Newsgroups: 
lugnet.cad.dev
Date: 
Tue, 22 Apr 2003 20:07:06 GMT
Viewed: 
963 times
  
In lugnet.cad.dev, Larry Pieniazek writes:

I found the code (I was looking for released files, not in the CVS tree) and
have extracted it (via WinCVS) to take a look...

OK, I did a little digging. If I understand what I am reading, the various
types of things that can be synthesized are defined with constants in the
lsynth.h include.

Elsewhere in the code these constants are checked (driven by what's found in
the .dat file being processed) to determine various things. For example the
function calc_angles in band.c uses these constants to determine angles of
things (based on the constraint that's being rounded)... this sort of
decision making appears in a number of places, but the numbers used depend
on the type of the thing being synthesized.

If I'm reading things right, to hack another type of synthesized thing in
would mean merely finding all the places where these constants are evaluated
and adding an additional elseif to honor the new type (depending on if it
was band or tube).

All that needs to be done (for string) to do that is decide what a good
element to represent a string segment is, and what the basic geometry of it
is (x,y,z dimensions).

But I don't HAVE a good element! The one I use is crappy, it's just an
approximation and just something I hacked up quickly. If committment to that
element is made, we all would regret it later. Better to allow that we swap
out definitions once someone does a better job of modeling string than I
did. The dimensions of a better string element may vary significantly from
the dimensions I chose... (because modeling the triplestrandedness may
require it to be smaller! or larger if you think about how one element has
to abut the next... unless the element includes 120 degrees of string
rotation you also have to handle rotating each instance of the element by
the right amount)

So the better way to do this would be to let the element itself be
parameterized, that is, supply the element definition (it's dimensions and
desired rotational orientation) in an external file. I suspect that adding
that functionality is quite a bit harder as it's not merely hacking in new
constants in a new elseif block, but actually changing the program to get
parms from an external file for some (or all?? that would allow other
elements to be improved if there ever was a need) element types...

That seems pretty hard to me, at this juncture, given that I haven't coded
in C in years (although one never forgets, it's like riding a bicycle). But
not undoable.

On that note, I've installed MinGW to give me gcc (because I see the
makefule specs gcc as the compiler)... but it didn't come with a make...
what's a good recommendation for a make? make-3.79.1 ?? Would I need MSys
too? (win 2k platform)



Message has 2 Replies:
  Re: Use of arbitrary elements with LSynth
 
"Larry Pieniazek" <lpieniazek@mercator.com> wrote in message news:HDrH7u.1FKp@lugnet.com... [ ... snipped ... ] (...) You can get a full complemnt of Unix utilities for your PC (including Make) by installing Cygwin (which is free): (URL) It has a (...) (21 years ago, 22-Apr-03, to lugnet.cad.dev)
  Re: Use of arbitrary elements with LSynth
 
(...) You read undocumented code quite well! (...) Yup. But unfortunatly you want to combine open things (tubes) with closed loops (bands), and the program is fundamentally *not* written for that. Bummer. (...) Will the element do for now? Maybe we (...) (21 years ago, 22-Apr-03, to lugnet.cad.dev)

Message is in Reply To:
  Re: Use of arbitrary elements with LSynth
 
(...) I found the code (I was looking for released files, not in the CVS tree) and have extracted it (via WinCVS) to take a look... (21 years ago, 22-Apr-03, to lugnet.cad.dev)

22 Messages in This Thread:






Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR