- vec_t = m.point(iu, t + 0.01) - p
- vec_u = m.point(iu+1, t) - p
- dirn = np.cross(vec_u, vec_t)
- return p + offset * dirn / np.linalg.norm(dirn)
+ vec_u = unit_v( m.point(iu+1, t) - p )
+ normal = np.cross(vec_u, vec_t)
+ return p, normal, vec_u, vec_t
+
+ def point_offset(m, iu, t, offset):
+ '''
+ offset by offset perpendicular to the surface
+ at the top (iu=t=0), +ve offset is in the +ve y direction
+ '''
+ p, normal, dummy, dummy = m.details(iu, t)
+ return p + offset * normal