Cleanup. Start tweaking flares, glares and flashes

This commit is contained in:
2021-10-29 21:47:03 +01:00
parent 78f91e522b
commit 502be6f64f
18 changed files with 59 additions and 153 deletions
-16
View File
@@ -15,7 +15,6 @@ module Geometry
, module Geometry.Bezier
, module Geometry.Vector
, module Geometry.LHS
--, module Geometry.Zone
)
where
import Geometry.Data
@@ -23,7 +22,6 @@ import Geometry.Intersect
import Geometry.Bezier
import Geometry.Vector
import Geometry.LHS
--import Geometry.Zone
import Data.Maybe
import Data.List
@@ -236,7 +234,6 @@ prependTwo _ [] = []
prependTwo _ [_] = []
prependTwo sep (x:y:xs) = sep : x : y : prependTwo sep (y:xs)
-- | Return n equidistant points on a circle with a radius of 600.
nRays :: Int -> [Point2]
nRays n = take n $ iterate (rotateV (2*pi/fromIntegral n)) (V2 600 0)
@@ -349,8 +346,6 @@ reflectInParam x line vec =
rAng = rotateV angle vec
p = x *.* errorClosestPointOnLine 3 (V2 0 0) (vNormal line) rAng
in rAng -.- p
--reflectIn' :: Point2 -> Point2 -> Point2 -> Point2 -> Point2
--reflectIn' l1 l2 v1 v2 = v1 +.+ reflectIn (l1 -.- l2) (v2 -.- v1)
isOnSeg :: Point2 -> Point2 -> Point2 -> Bool
isOnSeg l1 l2 p =
@@ -452,17 +447,6 @@ arcStepwisePositive ssize a cen v = (cen +.+) . (`rotateV` v) <$> rots
n :: Int
n = ceiling (a * magV v / ssize)
--nPointsOnCirc :: Int -> Float -> [Point2]
--nPointsOnCirc n rad = take n $ iterate (rotateV (2*pi/fromIntegral n)) (rad,0)
--lineInPolygon :: Point2 -> Point2 -> [Point2] -> Bool
--lineInPolygon a b ps =
-- pointInPolygon a ps
-- || pointInPolygon b ps
-- || any (isJust . uncurry (intersectSegSeg' a b)) pss
-- where
-- pss = zip ps (tail ps ++ [head ps])
-- | Given a list of points, returns pairs of points linking the points into a
-- loop.
makeLoopPairs :: [Point2] -> [(Point2,Point2)]