Grasshopper

algorithmic modeling for Rhino

Hello again,

I have a curving surface and I divided it into 7 x 7 points.

When I check the normal of each point, I discover that the normal direction is quite erratic and not consistent in each row.

I use these methods:

object_surface.ClosestPoint(surface_point, U, V)
normal_vector = object_surface.NormalAt(U, V)

Looking at the attached image, you can see that the axis are flipping up and down in one row.

So I was wondering if the ClosestPoint and NormalAt methods are accurate, or am I doing something terrible wrong? :-)

What is the best way to get 'smooth' transitioning normals across a row of points?

Thanks again!
Fernando 

Views: 737

Attachments:

Replies to This Discussion

normal vector is just one vector(perpendicular to surface at uv coord), what youre showing in this picture are cartesian coordinate systems (I belive that you obtained them with normal plane component). forgive me if Iam wrong, but Iam partially colorblind so I cant see which axis is red/green :) 

 

(Probably) plane with given z vector (normal plane) gets x and y axis by looking for world coordinate system, and so it can differ respectively to normal vector direction...

 

I preassume that .normalAt(u,v) works same as in surface divide component, which generates correct normal vectors (vector field ;))...

 


 

I'am also quite sure that David will add a new component which will be more flexible in planes generation (he wrote some time about it)...

 
"What is the best way to get 'smooth' transitioning normals across a row of points?"
IMO the best, but not perfect :


  1. evaluate reparametrized surface e.g. at uv = (0.5,0.5) (point A)

  2. then evaluate it at uv (0.6,0.5)
(u+0.1, v) (point B)
  3. now you have 2 points, make vector -> (AB)

  4. next use this vector + normal vector do define properly oriented normal plane (origin, normal vector as x axis, ab vector as y axis)


 

Thank you Mateusz! That was a great help, thank you for taking the time!
Fernando 

I have to add/conclude that these methods are very accurate, and that the strange behavior I got was due to my script.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service