Subject:
|
Re: Problem with LDraw-Mode and LDDP Bezier Curve plugin
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Mon, 21 Oct 2002 16:03:06 GMT
|
Viewed:
|
493 times
|
| |
| |
In lugnet.cad.dev, Fredrik Glöckner writes:
> "Orion Pobursky" <bilthefish@IHATESPAMyahoo.com> writes:
>
> > Have a look at this rendering:
> > http://www.pobursky.com/images/8458-1.png
> >
> > For some reason these flexible axles didn't create right.
> > They have a kinkin the middle instead of a smooth transition.
> > I generated them with both programs just to be sure. I'd solve
> > this one myself but I'm bezier curve dumb and still don't know
> > how Fredrik dynamically creates the control points.
I am also curious how ldraw mode generates the control points.
Lately I've been working on a hoser for ldglite based on some code
donated by Chris Daelman (which was based on the hoser spreadsheet).
I've been experimenting with with ways to simplify the positioning
of the control points. Currently I locate the interior control points
50 ldraw units in the direction of the hose from the end control
points. I think this corresponds to a "velocity" setting of 50 for
the more recent version of the hoser spreadsheet, and generates a much
smoother hose than the one Orion posted. After some experimenting, I
think the reason is that ldraw mode puts the interior control points
too far out (much farther than my hoser program), leaving too little
room for the curve to bend. Is this because the length parameter
is used to locate the control points?
I wish Frederic could whip up a short paragraph on how he uses
the length to position the control points. I'm not bright enough
to digest an algorithm that big. (I read the page on advanced
hose generation, but it didn't seem to be up to date with the rest
of the documentation).
> This is a very difficult situation to model. The fact that the end
> points are parallel make it difficult. Since there is little or no
> slack for the curve to curve itself in this case, you must make sure
> that the length of the curve is not excessive. You can thus get the
> best results by making sure that the length of the curve is as short as
> possible. Try to use something like 339.58946 as the length of the
> curve to insert.
>
> If you try to angle the end points slightly towards each other, you will
> probably get even better results. But keep in mind that the curve is
> essentially straight in this case, so it's length must not exceed the
> distance between the points by a large margin.
That sounds tricky. Blindly locating the interior control points.
The code Chris donated can optionally display where the interior control
points end up by drawing type 2 lines from the end points to the
subsequent interior points. This gives a really nice illustration of
how the curve gets shaped, and the 2 extra lines are easily deleted
later. It might be nice if this could be an option at in ldraw mode.
Something like (setq ldraw-bezier-draw-control-lines t).
Anyhow, here's an example of the smoother hose generated by the
less sophisticated ldglite hoser method with a "velocity" of 50 LDU
from end control point to interior control point. It includes some
blue type 2 lines which indicate where the interior control points
are located.
http://ldglite.sourceforge.net/benthose.dat
So what does everyone think about the different methods of locating
control points?
1. length of hose
2. velocity from hose end
3. manual location
Because I'm not sure where to go from here.
Don
|
|
Message has 2 Replies: | | Re: Problem with LDraw-Mode and LDDP Bezier Curve plugin
|
| (...) It is fairly well described here: (URL) I push the control points back and forth until the length of the curve is correct. This is done by numerical integration, and is rather CPU intensive. (...) Oh, you've already read it? It's not true that (...) (22 years ago, 21-Oct-02, to lugnet.cad.dev)
|
Message is in Reply To:
| | Re: Problem with LDraw-Mode and LDDP Bezier Curve plugin
|
| (...) This is a very difficult situation to model. The fact that the end points are parallell make it difficult. Since there is little or no slack for the curve to curve itself in this case, you must make sure that the length of the curve is not (...) (22 years ago, 20-Oct-02, to lugnet.cad.dev)
|
7 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
|
|
|
|