Put your triangle at 0,0,0
Put your camera at 0,0,-10
make your camera look at 0,0,0
now you are on the negative z axis looking at an xy plane.
y positive is up
this tri is cw:
(-1,0,0) - (0,1,0) - (1,0,0)
this tri is ccw:
(-1,0,0) - (0,-1,0) - (1,0,0)
Put your camera at 0,0,-10
make your camera look at 0,0,0
now you are on the negative z axis looking at an xy plane.
y positive is up
this tri is cw:
(-1,0,0) - (0,1,0) - (1,0,0)
this tri is ccw:
(-1,0,0) - (0,-1,0) - (1,0,0)
Graphics3D 500,500,0,2 cam = CreateCamera() PositionEntity cam , 0,0,-2 m=CreateMesh() PointEntity cam,m s = CreateSurface(m) v0 = AddVertex(s,-1,0,0) v1 = AddVertex(s,0,Sqr(2),0) v2 = AddVertex(s,1,0,0) ;cw: AddTriangle s,v0,v1,v2 ;ccw: ;AddTriangle s,v0,v2,v1 While Not KeyHit(1) RenderWorld Flip Wend