anchor.diff:                 |> Sg.trafo (Trafo3d.FromOrthoNormalBasis(V3d.IOO, V3d.OOI, V3d.OIO)  |> Mod.constant)
                  |> Sg.viewTrafo (viewTrafo   |> Mod.map CameraView.viewTrafo )
                  |> Sg.projTrafo (perspective |> Mod.map Frustum.projTrafo    )
  -               |> Sg.andAlso osg
  -
  +         
                  |> Sg.fillMode fillMode
   
                  |> Sg.trafo (Trafo3d.FromOrthoNormalBasis(V3d.IOO, -V3d.OIO, -V3d.OOI)  |> Mod.constant)
  
positive.code:                 realIntersections |> Seq.isEmpty |> not
  
                      
              let allSplines = p.outline |> Array.choose (function Bezier3(p0, p1, p2, p3) -> Some(Polygon2d(p0, p1, p2, p3)) | _ -> None)
  
              let rec run (l : list<PathSegment>) =
                  match l with
  
negative.code:                     if polygons.Count > 0 then Some polygons.[polygons.Count-1]
                      else None
  
                  let containing =
                      polygons 
                          |> Seq.indexed 
                          |> Seq.tryFind (fun (i,p) -> p.IsFullyContainedInside polygon || polygon.IsFullyContainedInside p)
        
  
  
                  // p0, p1, p2, p3
  
  
                  // p0*(1-t)^3 + 3*p1*(1-t)^2*t + 3*p2*(1-t)*t^2 + p3*t^3 - p0*(1-t)^2 - 2*t*pc - p3*t^2 = 0
  
                  // t = 0.5 :
                  // p0*0.5^3 + 3*p1*0.5^3 + 3*p2*0.5^3 + p3*0.5^3 - p0*0.5^2 - 2*0.5*pc - p3*0.5^2 = 0  
                  // p0*0.5^2 + 3*p1*0.5^2 + 3*p2*0.5^2 + p3*0.5^2 - p0*0.5 - 2*pc - p3*0.5 = 0  
                  //-p0/4 + p1*(3/4) + p2*(3/4) - p3/4 = 2*pc
                  //-p0/8 + p1*(3/8) + p2*(3/8) - p3/8 = pc
  
                  match containing with
                      | Some (i, other) ->
                          polygons.[i] <- mergePolys other polygon
  
                      
  //                    | Some last when polygon.IsFullyContainedInside last ->
  //                        polygons.[polygons.Count-1] <- mergePolys last polygon
  //
  //                    
  //                    | Some last when last.IsFullyContainedInside polygon ->
  //                        polygons.[polygons.Count-1] <- mergePolys polygon last
  
                      | _ ->
                          polygons.Add polygon
  