diff -Naur -x .gil _pvr.0/Makefile _pvr.1/Makefile
--- _pvr.0/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/Makefile	2026-03-10 04:20:32.826846677 +0100
@@ -0,0 +1,8 @@
+all:
+	$(MAKE) -f _pvr.mk
+so:
+	$(MAKE) -f _pvr.mk so
+clean:
+	$(MAKE) -C _tst/ clean
+	$(MAKE) -f _pvr.mk clean
+	$(MAKE) -C _pvr-nt/ clean
diff -Naur -x .gil _pvr.0/_pvr.c _pvr.1/_pvr.c
--- _pvr.0/_pvr.c	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_pvr.c	2026-03-10 03:47:48.652908082 +0100
@@ -0,0 +1,47 @@
+#include <stdio.h>
+#include "_pvr.h"
+void
+pv_bg(int *c)
+{ float f[3];
+  f[0]=(float)c[0]; f[0]/=255.0;
+  f[1]=(float)c[1]; f[1]/=255.0;
+  f[2]=(float)c[2]; f[2]/=255.0;
+  fprintf(stdout, "background{ color rgb <%.2g,%.2g,%.2g> }\n", f[0],f[1],f[2]);}
+
+void
+pv_cm(int *l, int *t)
+{ fprintf(stdout, "camera{ location <%d,%d,%d> look_at <%d,%d,%d> }\n", l[0],l[1],l[2],
+  t[0],t[1],t[2]);}
+
+void
+pv_ci()
+{ fprintf(stdout, "#include \"colors.inc\"\n");}
+
+void
+pv_ls(int *l, int *c)
+{ float f[3];
+  f[0]=(float)c[0]; f[0]/=255.0;
+  f[1]=(float)c[1]; f[1]/=255.0;
+  f[2]=(float)c[2]; f[2]/=255.0;
+  fprintf(stdout, "light_source{ <%d,%d,%d> color rgb <%.2g,%.2g,%.2g> }\n", l[0],l[1],l[2],
+  f[0],f[1],f[2]);}
+
+void
+pv_gs(int *l)
+{ float f[3];
+  f[0]=(float)l[0]; f[0]/=255.0;
+  f[1]=(float)l[1]; f[1]/=255.0;
+  f[2]=(float)l[2]; f[2]/=255.0;
+  fprintf(stdout, "global_settings{ ambient_light rgb <%.2g,%.2g,%.2g> }\n", f[0],f[1],f[2]);}
+
+void
+pv_sh(int *c, float r, int *t, float *p)
+{ float f[3];
+  f[0]=(float)t[0]; f[0]/=255.0;
+  f[1]=(float)t[1]; f[1]/=255.0;
+  f[2]=(float)t[2]; f[2]/=255.0;
+  fprintf(stdout, "sphere{\n <%d,%d,%d>, %.2g\n", c[0],c[1],c[2], r );
+  fprintf(stdout, " texture { pigment { color rgb <%.2g,%.2g,%.2g> } }\n", f[0],f[1],f[2] );
+  fprintf(stdout, " translate <%.2g,%.2g,%.2g>\n}\n", p[0],p[1],p[2] );
+}
+
diff -Naur -x .gil _pvr.0/_pvr.h _pvr.1/_pvr.h
--- _pvr.0/_pvr.h	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_pvr.h	2026-03-10 03:48:26.270906901 +0100
@@ -0,0 +1,13 @@
+#ifndef _PVR_H_
+#define _PVR_H_
+
+void pv_bg(int *c);
+void pv_cm(int *l, int *t);
+void pv_ci();
+void pv_ls(int *l, int *c);
+void pv_gs(int *l);
+
+void
+pv_sh(int *c, float r, int *t, float *p);
+
+#endif /* _PVR_H_ */
diff -Naur -x .gil _pvr.0/_pvr.mk _pvr.1/_pvr.mk
--- _pvr.0/_pvr.mk	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_pvr.mk	2026-03-10 03:15:15.962969363 +0100
@@ -0,0 +1,10 @@
+all: obj
+obj: _pvr.o
+so: libpvr.so
+_pvr.o: _pvr.c
+	gcc -c -fPIC $<
+libpvr.so: _pvr.o
+	gcc -shared -o $@ $<
+clean:
+	$(RM) _pvr.o
+	$(RM) libpvr.so
diff -Naur -x .gil _pvr.0/_pvr-nt/Makefile _pvr.1/_pvr-nt/Makefile
--- _pvr.0/_pvr-nt/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_pvr-nt/Makefile	2026-03-10 03:15:15.961969363 +0100
@@ -0,0 +1,18 @@
+all: pvr.cma
+pvr.cmo: pvr.ml pvr.cmi
+	ocamlc -c $<
+pvr.cmi: pvr.mli
+	ocamlc -c $<
+pvr_stub.o: pvr_stub.c
+	ocamlopt -c -fPIC -I ../ pvr_stub.c
+pvr.cma: pvr.cmo pvr_stub.o ../_pvr.o
+	ocamlmklib -o pvr -oc pvr_stub -linkall pvr.cmo pvr_stub.o ../_pvr.o
+../_pvr.o: ../_pvr.c
+	$(MAKE) -C ../
+clean:
+	$(RM) dllpvr_stub.so
+	$(RM) libpvr_stub.a
+	$(RM) pvr_stub.o
+	$(RM) pvr.cma
+	$(RM) pvr.cmo
+	$(RM) pvr.cmi
diff -Naur -x .gil _pvr.0/_pvr-nt/pvr.ml _pvr.1/_pvr-nt/pvr.ml
--- _pvr.0/_pvr-nt/pvr.ml	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_pvr-nt/pvr.ml	2026-03-10 04:04:15.147877271 +0100
@@ -0,0 +1,12 @@
+external pv_ci : unit -> unit
+  = "caml_pv_ci"
+external pv_bg : int * int * int -> unit
+  = "caml_pv_bg"
+external pv_cm : int * int * int -> int * int * int -> unit
+  = "caml_pv_cm"
+external pv_ls : int * int * int -> int * int * int -> unit
+  = "caml_pv_ls"
+external pv_gs : int * int * int -> unit
+  = "caml_pv_gs"
+external pv_sh : int * int * int -> float -> int * int * int -> float * float * float -> unit
+  = "caml_pv_sh"
diff -Naur -x .gil _pvr.0/_pvr-nt/pvr.mli _pvr.1/_pvr-nt/pvr.mli
--- _pvr.0/_pvr-nt/pvr.mli	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_pvr-nt/pvr.mli	2026-03-10 04:05:44.464874439 +0100
@@ -0,0 +1,7 @@
+val pv_ci : unit -> unit
+val pv_bg : int * int * int -> unit
+val pv_cm : int * int * int -> int * int * int -> unit
+val pv_ls : int * int * int -> int * int * int -> unit
+val pv_gs : int * int * int -> unit
+val pv_sh : int * int * int -> float -> int * int * int -> float * float * float -> unit
+(* pv_sh c r t p *)
diff -Naur -x .gil _pvr.0/_pvr-nt/pvr_stub.c _pvr.1/_pvr-nt/pvr_stub.c
--- _pvr.0/_pvr-nt/pvr_stub.c	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_pvr-nt/pvr_stub.c	2026-03-10 04:02:47.591879950 +0100
@@ -0,0 +1,69 @@
+#define CAML_NAME_SPACE
+#include <caml/mlvalues.h>
+#include "_pvr.h"
+
+CAMLprim value
+caml_pv_ci(value u)
+{ pv_ci(); return Val_unit; }
+
+CAMLprim value
+caml_pv_bg(value caml_c)
+{ int c[3];
+  c[0]=Long_val(Field(caml_c,0));
+  c[1]=Long_val(Field(caml_c,1));
+  c[2]=Long_val(Field(caml_c,2));
+  pv_bg(c); return Val_unit; }
+
+CAMLprim value
+caml_pv_cm(value caml_l, value caml_t)
+{ int l[3];
+  int t[3];
+  l[0]=Long_val(Field(caml_l,0)); t[0]=Long_val(Field(caml_t,0));
+  l[1]=Long_val(Field(caml_l,1)); t[1]=Long_val(Field(caml_t,1));
+  l[2]=Long_val(Field(caml_l,2)); t[2]=Long_val(Field(caml_t,2));
+  pv_cm(l, t); return Val_unit; }
+
+CAMLprim value
+caml_pv_ls(value caml_l, value caml_c)
+{ int c[3];
+  int l[3];
+  l[0]=Long_val(Field(caml_l,0));
+  l[1]=Long_val(Field(caml_l,1));
+  l[2]=Long_val(Field(caml_l,2));
+
+  c[0]=Long_val(Field(caml_c,0));
+  c[1]=Long_val(Field(caml_c,1));
+  c[2]=Long_val(Field(caml_c,2));
+
+  pv_ls(l, c); return Val_unit; }
+
+CAMLprim value
+caml_pv_gs(value caml_l)
+{ int l[3];
+  l[0]=Long_val(Field(caml_l,0));
+  l[1]=Long_val(Field(caml_l,1));
+  l[2]=Long_val(Field(caml_l,2));
+
+  pv_gs(l); return Val_unit; }
+
+CAMLprim value
+caml_pv_sh(value caml_c, value caml_r, value caml_t, value caml_p)
+{ int c[3];
+  int t[3];
+  float r;
+  float p[3];
+  c[0]=Long_val(Field(caml_c,0));
+  c[1]=Long_val(Field(caml_c,1));
+  c[2]=Long_val(Field(caml_c,2));
+  r=Double_val(caml_r);
+
+  t[0]=Long_val(Field(caml_t,0));
+  t[1]=Long_val(Field(caml_t,1));
+  t[2]=Long_val(Field(caml_t,2));
+
+  p[0]=Double_val(Field(caml_p,0));
+  p[1]=Double_val(Field(caml_p,1));
+  p[2]=Double_val(Field(caml_p,2));
+
+  pv_sh(c, r, t, p); return Val_unit; }
+
diff -Naur -x .gil _pvr.0/_pvr-nt/pvr.txt _pvr.1/_pvr-nt/pvr.txt
--- _pvr.0/_pvr-nt/pvr.txt	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_pvr-nt/pvr.txt	2026-03-10 03:15:15.961969363 +0100
@@ -0,0 +1,13 @@
+$ \ocaml -I . pvr.cma
+OCaml version 4.14.1
+# open Pvr;;
+
+# nm_th (0, 255, 127) ;;
+background { color rgb <0,1,0.5> }
+- : unit = ()
+
+# pv_cm (1, 2, 3) (0, 1, 0) ;;
+camera { location <1,2,3> look_at <0,1,0> }
+- : unit = ()
+
+#
diff -Naur -x .gil _pvr.0/_tst/_ga.ml _pvr.1/_tst/_ga.ml
--- _pvr.0/_tst/_ga.ml	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_tst/_ga.ml	2026-03-10 04:18:07.635851193 +0100
@@ -0,0 +1,14 @@
+#directory "../_pvr-nt/"
+#load "pvr.cma"
+open Pvr
+let () =
+  pv_ci ();
+  pv_bg (20,35,112);
+  pv_cm (2,5,2) (0,1,0);
+
+  pv_ls (3,5,4) (204,204,154);
+  pv_ls (3,5,-4) (154,154,102);
+
+  pv_gs (50,25,76);
+  pv_sh (0, 0, 0) 0.2 (0,25,255) (-0.8,0.,-0.4);
+;;
diff -Naur -x .gil _pvr.0/_tst/_ga.sh _pvr.1/_tst/_ga.sh
--- _pvr.0/_tst/_ga.sh	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_tst/_ga.sh	2026-03-10 03:28:49.504943700 +0100
@@ -0,0 +1 @@
+\ocaml -I ../_pvr-nt/ pvr.cma _ga.ml
diff -Naur -x .gil _pvr.0/_tst/_ga.txt _pvr.1/_tst/_ga.txt
--- _pvr.0/_tst/_ga.txt	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_tst/_ga.txt	2026-03-10 03:15:15.962969363 +0100
@@ -0,0 +1,16 @@
+#include "colors.inc"
+background { color rgb <0.2, 0.1, 0.4> }
+camera { location <1.8, 4.8, 2.4> look_at  <0, 0.6, 0> }
+light_source { <3, 5, 4> color rgb <0.8, 0.8, 0.6> }
+light_source { <3, 5, -4> color rgb <0.6, 0.6, 0.4> }
+global_settings { ambient_light rgb <0.2, 0.1, 0.3> }
+plane {
+  <0, 1, 0>, 0
+  texture { pigment { checker color rgb <0.8, 0.3, 0.1>, color rgb <0.86, 0.34, 0.12> } }
+}
+sphere {
+  <0, 0, 0>, 0.1
+  texture { pigment { color rgb <0, 0.1, 1> } }
+  scale <0.8, 0.8, 0.8>
+  translate <-0.8, 0, -0.4>
+}
diff -Naur -x .gil _pvr.0/_tst/Makefile _pvr.1/_tst/Makefile
--- _pvr.0/_tst/Makefile	1970-01-01 01:00:00.000000000 +0100
+++ _pvr.1/_tst/Makefile	2026-03-10 03:31:45.644938415 +0100
@@ -0,0 +1,10 @@
+#anti-aliasing
+#AA =
+AA = +A
+%.pov: %.ml
+	\ocaml -I ../_pvr-nt/ pvr.cma $< > $@
+%.png: %.pov
+	povray +W480 +H340 -V $(AA) +I$<
+clean:
+	$(RM) *.png
+	$(RM) *.pov
