Grasshopper

algorithmic modeling for Rhino

Hi,

I am trying to understand relation between input and output tA from CCX (Curve/Curve intersection). Understanding this relation of circle and line would be OK, but changing to rectagular and line or rectangular with corner fillet and line will not be possible to find out this relation. Could anyone has this experience before? pls. advise.

 

Thanks,

James

 

CCX-tA.png

Views: 1371

Attachments:

Replies to This Discussion

Hey,

 

tA and tB are relative curve parameters. Kind of length measured from one end along the curve itself.

Slider A will offset your lines in Z direction, making an intersection with the rectangle impossible.

Slider D changes the overall length of your rectangle curves. This will result in different relative values for the intersection mesured along the rectangle. tA will vary. The lines stay as they are, tB stays the same.

Hi Hannes,

Thank you for your advice.

James

Hi James,

 

the tA and tB values are the parameters along the curves where the intersection happens. Every unique point on a curve has a unique parameter associated with it. Furthermore, if a curve self-intersects then at that specific point there's two parameters, even though there's only one unique point.

 

Curve parameters are closely associated with the mathematics used to define the curves, they're not really 'supposed' to make sense to human brains. But imagine it works a bit like this. Let's say linear parts of a curve are parameterised according to length. So a 10 unit long linear curve has parameters going from zero to ten. Circular parts of a curve are parameterised by angle instead. So a full circle goes from zero to 360 and half a circle goes from zero to 180. If you intersect a rectangle with a line, you might get an intersection parameter like this:

 

 

 

If you fillet the corners of the rectangle, you get different parameters and a very different intersection point:

 

 

This is not how it really works, but it's a close enough analogy I think.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

Thank you for your kind explanation. It's giving me a really helpful guidance to point out where should I start to find those relations. I've made some attached study, could you check if this is correct?

 

Thanks,

James

 

Attachments:

Well it's definitely correct, the numbers that are coming out of the CCX component make sense. But then I have a fairly good idea about how different curve-types define their own default parameterization.

 

Polylines (rectangles become polylines when you convert them to curves) tend to be parameterized in such a way that the first segment goes from 0.0 to 1.0, the second segment goes from 1.0 to 2.0, and so on and so forth. Also the 'density' of parameters is constant. So if you take a small step in parameter space while standing at the start of a polyline segment, you'll travel an equal distance along the polyline when you take an identically small step while standing in the middle of that same segment.

 

Arcs and Circles tend to be parameterized by angle, except they use Radians instead of degrees. Arcs and circles too have constant parameterization, meaning that an identical difference in parameter results in an identical distance travelled along the curve.

 

Nurbs curves however have weird parameterization. It is rarely constant and also not very predictable. Parameterization will depend on control-point count, curve degree, whether a curve is periodic or not and the kind of knot-spacing (there's three default spacing defined, but an infinite number of possible spacing imaginable.

 

To make things worse, these are only the default parameterizations. It is possible to override the domain of a curve to be anything you want (as long as the start of the domain is a smaller number than the end of the domain. A "domain" btw. is just the numeric range that encompasses all parameters that are on the interior of the curve. The Reparameterize option in all Curve parameters will force the domain of every single curve to a 0.0~1.0 range.

 

Long story short, you don't have to understand how parameters work, you must only understand what they represent. A lot of components require parameters to work so you must know how to find the parameter you're looking for.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

Thank you for your promptly reply with useful information.

 

You are right, in face, I only wanted to know where to get point on the intersection to generate some other member in my design.

 

Cheers,

James

 

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service