Catmull–Clark subdivision surface/OCaml: Difference between revisions

m
add {{libheader|GLUT}}
No edit summary
m (add {{libheader|GLUT}})
 
(2 intermediate revisions by 2 users not shown)
Line 24:
;;
 
(* returns the index of the item that has just been pushed *)
let pushi da v =
let i = da.n in
Line 34:
 
 
Below is a program in OpenGL which displays a cube subdivided 2 times with the ''Catmull–Clark surface subdivision'' algorythmalgorithm.
 
{{libheader|glMLite}}
{{libheader|GLUT}}
 
You can compile everything together with:
ocamlopt -c dynar.ml
Line 66:
(6, 1, 2, 4);
(* comment some of these faces to see how
the algorythmalgorithm handles surfaces with holes
*)
|]
Anonymous user