Continue changes to quadratic bezier rendering

This commit is contained in:
jgk
2021-03-13 23:14:37 +01:00
parent 152d017e39
commit 3aefb8319d
4 changed files with 36 additions and 4 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ worldPictures w
testPic :: World -> [Picture]
testPic w = --[blank]
[setLayer 1 $ onLayerL [99] $ bezierQuad white red 20 20 (00,00) (200,200) (200,000) ]
[setLayer 1 $ onLayerL [99] $ bezierQuad white red 20 20 (00,00) (150,90) (200,200) ]
-- $ uncurry translate (mouseWorldPos w)
+2 -2
View File
@@ -84,8 +84,8 @@ bezierQuad cola colc ra rc a b c = BezierQuad 0 [(aX, cola, aX +.+ aRadVec , fra
| otherwise = c -.- b
cRadVec = rc *.* (normalizeV $ vNormal b2c)
cX = c -.- 0.5 *.* cRadVec
bX = (b -.- (0.5 * ra *.* aRadVec) )
-.- (0.5 * rc *.* cRadVec)
bX = (b -.- (0.5 *.* aRadVec) )
-.- (0.5 *.* cRadVec)
fracRadA = ra / magV (aX -.- cX)
fracRadC = rc / magV (aX -.- cX)