Subject:
|
Re: bend thingie creator.
|
Newsgroups:
|
lugnet.cad.dev
|
Date:
|
Sun, 26 Nov 2000 23:23:30 GMT
|
Viewed:
|
1042 times
|
| |
| |
> I've thought about using bezier curves but I decided to choose another
> type of curve because it doesn't allow you to make the curve pass by a
> specific point (except the first and last points).
Doesn't this complicate things a lot? It is possible easily draw a hundred
beziercurves that make up 1 curve, but how do you make 1 equation that
passes through a hundred points?
> > This was the problem with the release in my first posting (i think you mean
> > this), My rotation matrix based solely on the direction of the next segment
> > did provide with continous segments but it sometines turned 180° because it
> > switched to a different quadrant. I now have added another parameter with
> > which i can turn the segment around the direction. Now i Make the segment in
> > the correct direction , i calculate the distance between a point from the
> > previous segment and the current, turn it one degree to left and one to the
> > right, if the distance for one of these two turns is lower than the normal
> > distance i keep on turning that way until the distance is past its minimum.
> > than these two points are the closest together and my curve doesn't have any
> > strange twists.
>
> I'm using a different solution: I start with a given up vector for the
> first point and then at each point I calculate the tangent vector (first
> derivative) and make "side_vector = front_vector x up_vector; up = side
> x front;" ('x' means cross product) to get the new up vector. Probably
> not the ideal solution too but it's calculated only once and the results
> stored in a display list so who cares ? :)
I can calculate the tangent vector too, but just by substracting the current
point from the next point :-) .
Your solution sounds a lot faster,sturdier and geekier. I think I'm going to
steal this idea if I can figure out how to add this up-vector to my
rotation-matrix.
> It works very well for my case because when you add a new element, you
> always start with a hose along the X axis and the initial up vector is
> (0,0,1). When you move the tangents of the endpoints, you just have to
> recalculate the initial up vector.
> I also added an option to set the axial rotation at each point so you
> can see the elements twisting, looks very nice on an animation. :)
This definitely sounds very cool, makes me wish I could program a lot
better.
> Leonardo
>
|
|
Message has 1 Reply: | | Re: bend thingie creator.
|
| (...) Sorry, I explained myself poorly, I divide the curve in segments with only 2 points each. Bezier and Hermite curves are very similar, but I don't use Bezier curves because the control points are not very user-friendly, I'd rather have tangents (...) (24 years ago, 27-Nov-00, to lugnet.cad.dev)
|
Message is in Reply To:
| | Re: bend thingie creator.
|
| (...) I've thought about using bezier curves but I decided to choose another type of curve because it doesn't allow you to make the curve pass by a specific point (except the first and last points). (...) I'm using a different solution: I start with (...) (24 years ago, 26-Nov-00, to lugnet.cad.dev)
|
14 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
|
|
|
|