Skip to main content

NURBS dll example

  • July 22, 2019
  • 3 replies
  • 106 views

Brock.MCCABE

Does anyone have an example dll showing a NURBS fully defined?

3 replies

Andrew.Dennington
Forum|alt.badge.img

I'd love to see one too but it would have to be a very simple surface because of the very large number of control parameters needed to define a NURBS surface.  For example a fairly simple NURBS surface might be defined by x5 U curves and x5 V curves with each control curve defined by x5 control points, each of which is defined by an x,y and z value.   This adds up to 150 values needed to define the surface and although Zemax could handle up to 240 terms for a dll it would still be a quite a task to set up the initial values let alone optimise them.

Andrew


Forum|alt.badge.img
  • Monochrome
  • 5 replies
  • July 23, 2019

I think Grid Sag uses spline to interpolate between points, so it is partially able to do what NURBS would do. For DLL code, you may want to look and the spline and Bezier DLL from the user knowledge base:

https://customers.zemax.com/os/resources/learn/knowledgebase/how-to-create-surfaces-of-revolution-via-user-defi

 

 


Brock.MCCABE
  • Author
  • Monochrome
  • 1 reply
  • July 23, 2019

Thank you both for your time. I will take another look at those examples, Ray.

Even a simple NURBS example would be useful, if anyone has one.