diff options
Diffstat (limited to 'Build/source/utils/asymptote/examples/NURBSsphere.asy')
-rw-r--r-- | Build/source/utils/asymptote/examples/NURBSsphere.asy | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/examples/NURBSsphere.asy b/Build/source/utils/asymptote/examples/NURBSsphere.asy new file mode 100644 index 00000000000..d7f0e77321d --- /dev/null +++ b/Build/source/utils/asymptote/examples/NURBSsphere.asy @@ -0,0 +1,32 @@ +import three; +size(400); + +currentprojection=perspective(5,4,2,autoadjust=false); + +real[] uknot={0,0,0,1,1,2,2,3,3,4,4,4}; + +real[] vknot={0,0,0,1,1,2,2,2}; + +triple[][] P={{(0,0,1),(1,0,1),(1,0,0),(1,0,-1),(0,0,-1)}, + {(0,0,1),(1,1,1),(1,1,0),(1,1,-1),(0,0,-1)}, + {(0,0,1),(0,1,1),(0,1,0),(0,1,-1),(0,0,-1)}, + {(0,0,1),(-1,1,1),(-1,1,0),(-1,1,-1),(0,0,-1)}, + {(0,0,1),(-1,0,1),(-1,0,0),(-1,0,-1),(0,0,-1)}, + {(0,0,1),(-1,-1,1),(-1,-1,0),(-1,-1,-1),(0,0,-1)}, + {(0,0,1),(0,-1,1),(0,-1,0),(0,-1,-1),(0,0,-1)}, + {(0,0,1),(1,-1,1),(1,-1,0),(1,-1,-1),(0,0,-1)}, + {(0,0,1),(1,0,1),(1,0,0),(1,0,-1),(0,0,-1)}}; + +real[][] weights={ + {1,1,2,1,1}, + {1,1,2,1,1}, + {2,2,4,2,2}, + {1,1,2,1,1}, + {1,1,2,1,1}, + {1,1,2,1,1}, + {2,2,4,2,2}, + {1,1,2,1,1}, + {1,1,2,1,1} +}; + +draw(P,uknot,vknot,weights,yellow); |