Closed CsatiZoltan closed 2 years ago
Asymptote doesn't currently support NURBS in OpenGL or v3d (although a summer intern is looking into approximating them with Bezier curves and surfaces). They are supported in PRC (this requires the options -f pdf -prc and Adobe Reader).
I see. Some further questions I have in mind:
draw(P)
, but that signature is apparently not supported.Only Bezier surfaces and curves are currently supported (we used to use the GLU library to render NURBS but it is now deprecated and we now need to do our own rendering; work is underway to support NURBS).
Here are instructions for installing Adobe Reader under Fedora which you can adapt for Ubuntu: wget http://ardownload.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i486linux_enu.rpm
dnf install AdbeRdr9.5.5-1_i486linux_enu.rpm
dnf install libcanberra-gtk2.i686 adwaita-gtk2-theme.i686 PackageKit-gtk3-module.i686 mesa-dri-drivers.i686 gdk-pixbuf2-xlib.i686
If you zoom in on geom.html you will see that it is not correctly rendered; vector graphics is supposed to be scalable. It uses three.js which does not output vector graphics, unfortunately.
This is just a tesselation and yes, Asymptote supports tesselations too. If you are happy with a fixed-mesh approximation like this, one option would be to write a converter to v3d, which Asymptote can read directly.
Thank you for the quick reply and the clear explanations. Once NURBS are implemented, will you support arbitrary number of control points, or will it be restricted to degree 3?
We will support a NURBS of arbitrary degree, just like in the PRC version.
I want to plot a (non-rational) B-spline surface. Following the advice on the forum, I used NURBSsurface as a starting point. However, I get an empty output when I run the code. The same issue with the code in this post: the control net is shown but the surface is not.
The same issue happens on the web application as locally, on my system: