Grasshopper

algorithmic modeling for Rhino

Hi everybody,

 

My aim is to derivate vectors in GH.

I wan't to test it with the help of curvature as it is given by Rhino.

The formula for curvature is:

Kn = dt/ds

where

t is the tangent vector

n the normal vector

K the curvature

which I approximate by

Kn(s) ~= (t(s+ds/2) - t(s-ds/2)) / ds

where ds is very small.

 

I find a vector with the right direction (youpi!), but its way too long (see picture).

Obviously something is wrong, but I can't figure out what..


I would really appreciate any help

thanks

Views: 762

Attachments:

Replies to This Discussion

Nobody knows?

I'm kind of stuck there. What is troubling me, is that the difference in length between the curvature vector I calculate, and the one given by rhino is not constant along the curve.. However, both vectors stay colinear...

 

Am I missing something obvious? Is this not the way to derivate vectors?

I suspect that the vector in Rhino has been unitized.  Divide your vector by its length and see what you get.

 

Chris

No, that's not it.

 

Chris

In your formula above s is curve length not parameter space.  Rev1 is still using parameter space in locating the tangent points but is using curve length for division by s but because of this mixing it is still not correct in it's logic.  Rev2 is using curve length for both tangent points and division by s and is correct in it's logic...or so I believe.

Chris
Attachments:
oua
thanks alot man!
I suspected something hidden, but couldn't put my finger on it.
You made my day!
I guess both approaches are right in finding the curvature, but you're right saying the 2nd is more coherent.
From now on I'll pay attention to parameter space vs. arc-length^^
Hi Sebastien,
there now is a Derivates component in the Curve tab, will that help you out?

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service