temp change: using vectors instead of list

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
import Prelude
import Data.List
import qualified Data.Vector as V
import qualified Data.Vector.Unboxed as U

type Qt = (Double, Double, Double, Double) 
qx (x, _, _, _) = x
qy (_, y, _, _) = y
qz (_, _, z, _) = z
qw (_, _, _, w) = w

qmul a b = 
	(qx a * qw b + qw a * qx b + qy a * qz b - qz a * qy b,
	 qy a * qw b + qw a * qy b + qz a * qx b - qx a * qz b,
	 qz a * qw b + qw a * qz b + qx a * qy b - qy a * qx b,
	 qw a * qw b - qx a * qx b - qy a * qy b - qz a * qz b)
qinv a = (-(qx a), -(qy a), -(qz a), qw a)
axis_ang axis ang = ((vx axis) * (sin (ang/2)), (vy axis) * (sin (ang/2)), (vz axis) * (sin (ang/2)), cos (ang/2))

type Vec = (Double, Double, Double) 
vx (x, _, _) = x
vy (_, y, _) = y
vz (_, _, z) = z

vrot rot vec = vec_from_qt (qmul (qmul rot (qt_from_vec vec)) (qinv rot))
qt_from_vec a = (vx a, vy a, vz a, 0)
vec_from_qt a = (qx a, qy a, qz a)
vproj ang rad = ((cos ang) * rad, (sin ang) * rad, 0)
vop f a b = (f (vx a) (vx b), f (vy a) (vy b), f (vz a) (vz b))
vadd = vop (+)
vdiv = vop (/)
vsub = vop (-)
vmul = vop (*)

type Col = (Double, Double, Double) 
r (a, _, _) = a
g (_, a, _) = a
b (_, _, a) = a

data Pivot = Pivot { 
	pivot_len  :: Double, 
	pivot_rot  :: Qt, 
	pivot_rads :: U.Vector Double, 
	pivot_cols :: U.Vector Col
} deriving (Show)

data Mesh = Mesh {
	mesh_rot  :: Qt,
	mesh_cpos :: Vec,
	mesh_positions :: U.Vector Double,
	mesh_colors    :: U.Vector Double,
	mesh_indexes   :: U.Vector Int
} deriving (Show)

faceIndexes :: Int -> Int -> Int -> Int -> U.Vector Int
faceIndexes i j w h =
	if j < (h-1) then
		let	a = j*w+i
			b = j*w+(mod (i+1) w)
			c = (j+1)*w+i
			d = (j+1)*w+(mod (i+1) w)
		in (U.fromList [a,b,d,d,c,a])
	else U.empty

buildMesh :: V.Vector Pivot -> Mesh
buildMesh pivots = V.foldl build_layer initial (V.zip (V.enumFromTo 0 height) pivots) where	
	initial	= Mesh (0, 0, 0, 1) (0, 0, 0) U.empty U.empty U.empty
	width 	= U.length (pivot_rads (V.head pivots))
	height	= V.length pivots
	depth	= 3
	build_layer step (j,pivot) = U.foldl build_vertexes step (U.zip3 (U.enumFromTo 0 width) (pivot_rads pivot) (pivot_cols pivot)) where
		rot 	= qmul (mesh_rot step) (pivot_rot pivot)
		cpos	= vadd (mesh_cpos step) (vrot rot (0, 0, pivot_len pivot))
		build_vertexes step (i,vrad,vcol) = Mesh rot cpos positions colors indexes where
			vang 		= ((fromIntegral i)/(fromIntegral width))*2.0*pi
			vpos		= vadd cpos (vrot rot (vproj vang vrad))
			positions	= (mesh_positions step) U.++ (U.fromList [(vx vpos),(vy vpos),(vz vpos)])
			colors 		= (mesh_colors step) U.++ (U.fromList [(r vcol),(g vcol),(b vcol)])
			indexes 	= (mesh_indexes step) U.++ (faceIndexes i j width height)

val = buildMesh 
	(V.replicate 128
		(Pivot 
			1 
			(0, 0, 0, 1) 
			(U.replicate 8 1)
			(U.replicate 8 (1, 1, 1))))

main = print val
18:1: Warning: Use camelCase
Found:
axis_ang axis ang = ...
Why not:
axisAng axis ang = ...
18:22: Warning: Redundant bracket
Found:
(vx axis) * (sin (ang / 2))
Why not:
vx axis * (sin (ang / 2))
18:22: Warning: Redundant bracket
Found:
(vx axis) * (sin (ang / 2))
Why not:
(vx axis) * sin (ang / 2)
18:49: Warning: Redundant bracket
Found:
(vy axis) * (sin (ang / 2))
Why not:
vy axis * (sin (ang / 2))
18:49: Warning: Redundant bracket
Found:
(vy axis) * (sin (ang / 2))
Why not:
(vy axis) * sin (ang / 2)
18:76: Warning: Redundant bracket
Found:
(vz axis) * (sin (ang / 2))
Why not:
vz axis * (sin (ang / 2))
18:76: Warning: Redundant bracket
Found:
(vz axis) * (sin (ang / 2))
Why not:
(vz axis) * sin (ang / 2)
26:1: Warning: Use camelCase
Found:
qt_from_vec a = ...
Why not:
qtFromVec a = ...
27:1: Warning: Use camelCase
Found:
vec_from_qt a = ...
Why not:
vecFromQt a = ...
28:18: Warning: Redundant bracket
Found:
(cos ang) * rad
Why not:
cos ang * rad
28:35: Warning: Redundant bracket
Found:
(sin ang) * rad
Why not:
sin ang * rad
40:1: Warning: Use camelCase
Found:
data Pivot = Pivot{pivot_len :: Double, pivot_rot :: Qt,
pivot_rads :: U.Vector Double, pivot_cols :: U.Vector Col}
deriving Show
Why not:
data Pivot = Pivot{pivotLen :: Double, pivotRot :: Qt,
pivotRads :: U.Vector Double, pivotCols :: U.Vector Col}
deriving Show
47:1: Warning: Use camelCase
Found:
data Mesh = Mesh{mesh_rot :: Qt, mesh_cpos :: Vec,
mesh_positions :: U.Vector Double, mesh_colors :: U.Vector Double,
mesh_indexes :: U.Vector Int}
deriving Show
Why not:
data Mesh = Mesh{meshRot :: Qt, meshCpos :: Vec,
meshPositions :: U.Vector Double, meshColors :: U.Vector Double,
meshIndexes :: U.Vector Int}
deriving Show
58:17: Warning: Redundant bracket
Found:
let a = j * w + i
b = j * w + (mod (i + 1) w)
c = (j + 1) * w + i
d = (j + 1) * w + (mod (i + 1) w)
in (U.fromList [a, b, d, d, c, a])
Why not:
let a = j * w + i
b = j * w + (mod (i + 1) w)
c = (j + 1) * w + i
d = (j + 1) * w + (mod (i + 1) w)
in U.fromList [a, b, d, d, c, a]
59:29: Warning: Redundant bracket
Found:
j * w + (mod (i + 1) w)
Why not:
j * w + mod (i + 1) w
61:29: Warning: Redundant bracket
Found:
(j + 1) * w + (mod (i + 1) w)
Why not:
(j + 1) * w + mod (i + 1) w
75:44: Warning: Redundant bracket
Found:
(fromIntegral i) / (fromIntegral width)
Why not:
fromIntegral i / (fromIntegral width)
75:44: Warning: Redundant bracket
Found:
(fromIntegral i) / (fromIntegral width)
Why not:
(fromIntegral i) / fromIntegral width
77:43: Warning: Redundant bracket
Found:
(mesh_positions step) U.++
(U.fromList [(vx vpos), (vy vpos), (vz vpos)])
Why not:
mesh_positions step U.++
(U.fromList [(vx vpos), (vy vpos), (vz vpos)])
77:43: Warning: Redundant bracket
Found:
(mesh_positions step) U.++
(U.fromList [(vx vpos), (vy vpos), (vz vpos)])
Why not:
(mesh_positions step) U.++
U.fromList [(vx vpos), (vy vpos), (vz vpos)]
77:82: Warning: Redundant bracket
Found:
[(vx vpos), (vy vpos), (vz vpos)]
Why not:
[vx vpos, (vy vpos), (vz vpos)]
77:82: Warning: Redundant bracket
Found:
[(vx vpos), (vy vpos), (vz vpos)]
Why not:
[(vx vpos), vy vpos, (vz vpos)]
77:82: Warning: Redundant bracket
Found:
[(vx vpos), (vy vpos), (vz vpos)]
Why not:
[(vx vpos), (vy vpos), vz vpos]
78:43: Warning: Redundant bracket
Found:
(mesh_colors step) U.++ (U.fromList [(r vcol), (g vcol), (b vcol)])
Why not:
mesh_colors step U.++ (U.fromList [(r vcol), (g vcol), (b vcol)])
78:43: Warning: Redundant bracket
Found:
(mesh_colors step) U.++ (U.fromList [(r vcol), (g vcol), (b vcol)])
Why not:
(mesh_colors step) U.++ U.fromList [(r vcol), (g vcol), (b vcol)]
78:79: Warning: Redundant bracket
Found:
[(r vcol), (g vcol), (b vcol)]
Why not:
[r vcol, (g vcol), (b vcol)]
78:79: Warning: Redundant bracket
Found:
[(r vcol), (g vcol), (b vcol)]
Why not:
[(r vcol), g vcol, (b vcol)]
78:79: Warning: Redundant bracket
Found:
[(r vcol), (g vcol), (b vcol)]
Why not:
[(r vcol), (g vcol), b vcol]
79:43: Warning: Redundant bracket
Found:
(mesh_indexes step) U.++ (faceIndexes i j width height)
Why not:
mesh_indexes step U.++ (faceIndexes i j width height)
79:43: Warning: Redundant bracket
Found:
(mesh_indexes step) U.++ (faceIndexes i j width height)
Why not:
(mesh_indexes step) U.++ faceIndexes i j width height

temp change: using vectors instead of list (annotation)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import qualified Data.Vector as V

data Qt = Qt {
	qx :: Double, 
	qy :: Double, 
	qz :: Double, 
	qw :: Double
} deriving (Show)

qmul :: Qt -> Qt -> Qt
qmul a b = Qt
	(qx a * qw b + qw a * qx b + qy a * qz b - qz a * qy b)
	(qy a * qw b + qw a * qy b + qz a * qx b - qx a * qz b)
	(qz a * qw b + qw a * qz b + qx a * qy b - qy a * qx b)
	(qw a * qw b - qx a * qx b - qy a * qy b - qz a * qz b)

qinv :: Qt -> Qt
qinv a = Qt (-(qx a)) (-(qy a)) (-(qz a)) (qw a)

data Vec = Vec {
	vx :: Double, 
	vy :: Double, 
	vz :: Double
} deriving (Show)

vrot :: Qt -> Vec -> Vec
vrot rot vec = vecFromQt (qmul (qmul rot (qtFromVec vec)) (qinv rot))

qtFromVec :: Vec -> Qt
qtFromVec a = Qt (vx a) (vy a) (vz a) 0

vecFromQt :: Qt -> Vec
vecFromQt a = Vec (qx a) (qy a) (qz a)

vproj :: Double -> Double -> Vec
vproj ang rad = Vec ((cos ang) * rad) ((sin ang) * rad) 0

vop :: (Double -> Double -> Double) -> Vec -> Vec -> Vec
vop f a b = Vec (f (vx a) (vx b)) (f (vy a) (vy b)) (f (vz a) (vz b))

vadd :: Vec -> Vec -> Vec
vadd = vop (+)

data Col = Col { 
	r :: Double, 
	g :: Double, 
	b :: Double 
} deriving (Show)

data Pivot = Pivot { 
	pivotLen :: Double, 
	pivotRot :: Qt, 
	pivotRads :: V.Vector Double, 
	pivotCols :: V.Vector Col
} deriving (Show)

data Mesh = Mesh {
	meshRot :: Qt,
	meshCpos :: Vec,
	meshPositions :: V.Vector Double,
	meshColors :: V.Vector Double,
	meshIndices :: V.Vector Int
} deriving (Show)

faceIndices :: Int -> Int -> Int -> Int -> V.Vector Int
faceIndices i j w h =
	if j < (h-1) then
		let	a = j * w + i
			b = j * w + mod (i + 1) w
			c = (j + 1) * w + i
			d = (j + 1) * w + mod (i + 1) w
		in V.fromList [a,b,d,d,c,a]
	else V.fromList []

buildMesh :: V.Vector Pivot -> Mesh
buildMesh pivots = V.foldl' buildLayer initial (V.zip (V.enumFromN height 0) pivots) where	
	initial	= Mesh (Qt 0 0 0 1) (Vec 0 0 0) (V.fromList []) (V.fromList []) (V.fromList [])
	width 	= V.length (pivotRads (V.head pivots))
	height	= V.length pivots
	buildLayer step (j,pivot) = V.foldl' buildVertices step (V.zip3 (V.enumFromN width 0) (pivotRads pivot) (pivotCols pivot)) where
		rot 	= qmul (meshRot step) (pivotRot pivot)
		cpos	= vadd (meshCpos step) (vrot rot (Vec 0 0 (pivotLen pivot)))
		buildVertices step (i,vrad,vcol) = Mesh rot cpos positions colors indices where
			vang 		= fromIntegral i / fromIntegral width  * 2.0 * pi
			vpos		= vadd cpos (vrot rot (vproj vang vrad))
			positions	= meshPositions step V.++ V.fromList [vx vpos, vy vpos, vz vpos]
			colors 		= meshColors step V.++ V.fromList [r vcol, g vcol, b vcol]
			indices 	= meshIndices step V.++ faceIndices i j width height

val :: Mesh
val = buildMesh 
	(V.replicate 128
		(Pivot 
			1 
			(Qt 0 0 0 1) 
			(V.fromList [1,1,1,1,1,1,1,1]) 
			(V.fromList [(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1)])))

main :: IO ()
main = print val
36:22: Warning: Redundant bracket
Found:
(cos ang) * rad
Why not:
cos ang * rad
36:40: Warning: Redundant bracket
Found:
(sin ang) * rad
Why not:
sin ang * rad
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1,
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
Col 1 1 1, (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), Col 1 1 1, (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), Col 1 1 1]

temp change: using vectors instead of list (annotation) (annotation)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import qualified Data.Vector as V

data Qt = Qt {
	qx :: Double, 
	qy :: Double, 
	qz :: Double, 
	qw :: Double
} deriving (Show)

qmul :: Qt -> Qt -> Qt
qmul a b = Qt
	(qx a * qw b + qw a * qx b + qy a * qz b - qz a * qy b)
	(qy a * qw b + qw a * qy b + qz a * qx b - qx a * qz b)
	(qz a * qw b + qw a * qz b + qx a * qy b - qy a * qx b)
	(qw a * qw b - qx a * qx b - qy a * qy b - qz a * qz b)

qinv :: Qt -> Qt
qinv a = Qt (-(qx a)) (-(qy a)) (-(qz a)) (qw a)

data Vec = Vec {
	vx :: Double, 
	vy :: Double, 
	vz :: Double
} deriving (Show)

vrot :: Qt -> Vec -> Vec
vrot rot vec = vecFromQt (qmul (qmul rot (qtFromVec vec)) (qinv rot))

qtFromVec :: Vec -> Qt
qtFromVec a = Qt (vx a) (vy a) (vz a) 0

vecFromQt :: Qt -> Vec
vecFromQt a = Vec (qx a) (qy a) (qz a)

vproj :: Double -> Double -> Vec
vproj ang rad = Vec ((cos ang) * rad) ((sin ang) * rad) 0

vop :: (Double -> Double -> Double) -> Vec -> Vec -> Vec
vop f a b = Vec (f (vx a) (vx b)) (f (vy a) (vy b)) (f (vz a) (vz b))

vadd :: Vec -> Vec -> Vec
vadd = vop (+)

data Col = Col { 
	r :: Double, 
	g :: Double, 
	b :: Double 
} deriving (Show)

data Pivot = Pivot { 
	pivotLen :: Double, 
	pivotRot :: Qt, 
	pivotRads :: V.Vector Double, 
	pivotCols :: V.Vector Col
} deriving (Show)

data Mesh = Mesh {
	meshRot :: Qt,
	meshCpos :: Vec,
	meshPositions :: V.Vector Double,
	meshColors :: V.Vector Double,
	meshIndices :: V.Vector Int
} deriving (Show)

faceIndices :: Int -> Int -> Int -> Int -> V.Vector Int
faceIndices i j w h =
	if j < (h-1) then
		let	a = j * w + i
			b = j * w + mod (i + 1) w
			c = (j + 1) * w + i
			d = (j + 1) * w + mod (i + 1) w
		in V.fromList [a,b,d,d,c,a]
	else V.fromList []

buildMesh :: V.Vector Pivot -> Mesh
buildMesh pivots = V.foldl' buildLayer initial (V.zip (V.enumFromN 0 height) pivots) where	
	initial	= Mesh (Qt 0 0 0 1) (Vec 0 0 0) (V.fromList []) (V.fromList []) (V.fromList [])
	width 	= V.length (pivotRads (V.head pivots))
	height	= V.length pivots
	buildLayer step (j,pivot) = V.foldl' buildVertices step (V.zip3 (V.enumFromN 0 width) (pivotRads pivot) (pivotCols pivot)) where
		rot 	= qmul (meshRot step) (pivotRot pivot)
		cpos	= vadd (meshCpos step) (vrot rot (Vec 0 0 (pivotLen pivot)))
		buildVertices step (i,vrad,vcol) = Mesh rot cpos positions colors indices where
			vang 		= fromIntegral i / fromIntegral width  * 2.0 * pi
			vpos		= vadd cpos (vrot rot (vproj vang vrad))
			positions	= meshPositions step V.++ V.fromList [vx vpos, vy vpos, vz vpos]
			colors 		= meshColors step V.++ V.fromList [r vcol, g vcol, b vcol]
			indices 	= meshIndices step V.++ faceIndices i j width height

val :: Mesh
val = buildMesh 
	(V.replicate 128
		(Pivot 
			1 
			(Qt 0 0 0 1) 
			(V.fromList [1,1,1,1,1,1,1,1]) 
			(V.fromList [(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1)])))

main :: IO ()
main = print val
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
36:22: Warning: Redundant bracket
Found:
(cos ang) * rad
Why not:
cos ang * rad
36:40: Warning: Redundant bracket
Found:
(sin ang) * rad
Why not:
sin ang * rad
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1,
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
Col 1 1 1, (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), Col 1 1 1, (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), Col 1 1 1]

temp change: using vectors instead of list (annotation) (annotation)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import qualified Data.Vector as V

data Qt = Qt {
	qx :: Double, 
	qy :: Double, 
	qz :: Double, 
	qw :: Double
} deriving (Show)

qmul :: Qt -> Qt -> Qt
qmul a b = Qt
	(qx a * qw b + qw a * qx b + qy a * qz b - qz a * qy b)
	(qy a * qw b + qw a * qy b + qz a * qx b - qx a * qz b)
	(qz a * qw b + qw a * qz b + qx a * qy b - qy a * qx b)
	(qw a * qw b - qx a * qx b - qy a * qy b - qz a * qz b)

qinv :: Qt -> Qt
qinv a = Qt (-(qx a)) (-(qy a)) (-(qz a)) (qw a)

data Vec = Vec {
	vx :: Double, 
	vy :: Double, 
	vz :: Double
} deriving (Show)

vrot :: Qt -> Vec -> Vec
vrot rot vec = vecFromQt (qmul (qmul rot (qtFromVec vec)) (qinv rot))

qtFromVec :: Vec -> Qt
qtFromVec a = Qt (vx a) (vy a) (vz a) 0

vecFromQt :: Qt -> Vec
vecFromQt a = Vec (qx a) (qy a) (qz a)

vproj :: Double -> Double -> Vec
vproj ang rad = Vec ((cos ang) * rad) ((sin ang) * rad) 0

vop :: (Double -> Double -> Double) -> Vec -> Vec -> Vec
vop f a b = Vec (f (vx a) (vx b)) (f (vy a) (vy b)) (f (vz a) (vz b))

vadd :: Vec -> Vec -> Vec
vadd = vop (+)

data Col = Col { 
	r :: Double, 
	g :: Double, 
	b :: Double 
} deriving (Show)

data Pivot = Pivot { 
	pivotLen :: Double, 
	pivotRot :: Qt, 
	pivotRads :: V.Vector Double, 
	pivotCols :: V.Vector Col
} deriving (Show)

data Mesh = Mesh {
	meshRot :: Qt,
	meshCpos :: Vec,
	meshPositions :: V.Vector Double,
	meshColors :: V.Vector Double,
	meshIndices :: V.Vector Int
} deriving (Show)

faceIndices :: Int -> Int -> Int -> Int -> V.Vector Int
faceIndices i j w h =
	if j < (h-1) then
		let	a = j * w + i
			b = j * w + mod (i + 1) w
			c = (j + 1) * w + i
			d = (j + 1) * w + mod (i + 1) w
		in V.fromList [a,b,d,d,c,a]
	else V.fromList []

buildMesh :: V.Vector Pivot -> Mesh
buildMesh pivots = V.foldl' buildLayer initial (V.zip (V.enumFromN 0 height) pivots) where	
	initial	= Mesh (Qt 0 0 0 1) (Vec 0 0 0) (V.fromList []) (V.fromList []) (V.fromList [])
	width 	= V.length (pivotRads (V.head pivots))
	height	= V.length pivots
	buildLayer step (j,pivot) = V.foldl' buildVertices step (V.zip3 (V.enumFromN 0 width) (pivotRads pivot) (pivotCols pivot)) where
		rot 	= qmul (meshRot step) (pivotRot pivot)
		cpos	= vadd (meshCpos step) (vrot rot (Vec 0 0 (pivotLen pivot)))
		buildVertices step (i,vrad,vcol) = Mesh rot cpos positions colors indices where
			vang 		= fromIntegral i / fromIntegral width  * 2.0 * pi
			vpos		= vadd cpos (vrot rot (vproj vang vrad))
			positions	= meshPositions step V.++ V.fromList [vx vpos, vy vpos, vz vpos]
			colors 		= meshColors step V.++ V.fromList [r vcol, g vcol, b vcol]
			indices 	= meshIndices step V.++ faceIndices i j width height

val :: Mesh
val = buildMesh 
	(V.replicate 128
		(Pivot 
			1 
			(Qt 0 0 0 1) 
			(V.fromList [1,1,1,1,1,1,1,1]) 
			(V.fromList [(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1)])))

main :: IO ()
main = print val
36:22: Warning: Redundant bracket
Found:
(cos ang) * rad
Why not:
cos ang * rad
36:40: Warning: Redundant bracket
Found:
(sin ang) * rad
Why not:
sin ang * rad
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1,
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
Col 1 1 1, (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), Col 1 1 1, (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), Col 1 1 1]

temp change: using vectors instead of list (annotation) (annotation)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import qualified Data.Vector as V

data Qt = Qt {
	qx :: Double, 
	qy :: Double, 
	qz :: Double, 
	qw :: Double
} deriving (Show)

qmul :: Qt -> Qt -> Qt
qmul a b = Qt
	(qx a * qw b + qw a * qx b + qy a * qz b - qz a * qy b)
	(qy a * qw b + qw a * qy b + qz a * qx b - qx a * qz b)
	(qz a * qw b + qw a * qz b + qx a * qy b - qy a * qx b)
	(qw a * qw b - qx a * qx b - qy a * qy b - qz a * qz b)

qinv :: Qt -> Qt
qinv a = Qt (-(qx a)) (-(qy a)) (-(qz a)) (qw a)

data Vec = Vec {
	vx :: Double, 
	vy :: Double, 
	vz :: Double
} deriving (Show)

vrot :: Qt -> Vec -> Vec
vrot rot vec = vecFromQt (qmul (qmul rot (qtFromVec vec)) (qinv rot))

qtFromVec :: Vec -> Qt
qtFromVec a = Qt (vx a) (vy a) (vz a) 0

vecFromQt :: Qt -> Vec
vecFromQt a = Vec (qx a) (qy a) (qz a)

vproj :: Double -> Double -> Vec
vproj ang rad = Vec ((cos ang) * rad) ((sin ang) * rad) 0

vop :: (Double -> Double -> Double) -> Vec -> Vec -> Vec
vop f a b = Vec (f (vx a) (vx b)) (f (vy a) (vy b)) (f (vz a) (vz b))

vadd :: Vec -> Vec -> Vec
vadd = vop (+)

data Col = Col { 
	r :: Double, 
	g :: Double, 
	b :: Double 
} deriving (Show)

data Pivot = Pivot { 
	pivotLen :: Double, 
	pivotRot :: Qt, 
	pivotRads :: V.Vector Double, 
	pivotCols :: V.Vector Col
} deriving (Show)

data Mesh = Mesh {
	meshRot :: Qt,
	meshCpos :: Vec,
	meshPositions :: V.Vector Double,
	meshColors :: V.Vector Double,
	meshIndices :: V.Vector Int
} deriving (Show)

faceIndices :: Int -> Int -> Int -> Int -> V.Vector Int
faceIndices i j w h =
	if j < (h-1) then
		let	a = j * w + i
			b = j * w + mod (i + 1) w
			c = (j + 1) * w + i
			d = (j + 1) * w + mod (i + 1) w
		in V.fromList [a,b,d,d,c,a]
	else V.fromList []

buildMesh :: V.Vector Pivot -> Mesh
buildMesh pivots = V.foldl' buildLayer initial (V.zip (V.enumFromN 0 height) pivots) where	
	initial	= Mesh (Qt 0 0 0 1) (Vec 0 0 0) (V.fromList []) (V.fromList []) (V.fromList [])
	width 	= V.length (pivotRads (V.head pivots))
	height	= V.length pivots
	buildLayer step (j,pivot) = V.foldl' buildVertices step (V.zip3 (V.enumFromN 0 width) (pivotRads pivot) (pivotCols pivot)) where
		rot 	= qmul (meshRot step) (pivotRot pivot)
		cpos	= vadd (meshCpos step) (vrot rot (Vec 0 0 (pivotLen pivot)))
		buildVertices step (i,vrad,vcol) = Mesh rot cpos positions colors indices where
			vang 		= fromIntegral i / fromIntegral width  * 2.0 * pi
			vpos		= vadd cpos (vrot rot (vproj vang vrad))
			positions	= meshPositions step V.++ V.fromList [vx vpos, vy vpos, vz vpos]
			colors 		= meshColors step V.++ V.fromList [r vcol, g vcol, b vcol]
			indices 	= meshIndices step V.++ faceIndices i j width height

val :: Mesh
val = buildMesh 
	(V.replicate 128
		(Pivot 
			1 
			(Qt 0 0 0 1) 
			(V.fromList [1,1,1,1,1,1,1,1]) 
			(V.fromList [(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1)])))

main :: IO ()
main = print val
36:22: Warning: Redundant bracket
Found:
(cos ang) * rad
Why not:
cos ang * rad
36:40: Warning: Redundant bracket
Found:
(sin ang) * rad
Why not:
sin ang * rad
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1,
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
Col 1 1 1, (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), Col 1 1 1, (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), Col 1 1 1]

temp change: using vectors instead of list (annotation) (annotation) (annotation)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import qualified Data.Vector as V

data Qt = Qt {
	qx :: Double, 
	qy :: Double, 
	qz :: Double, 
	qw :: Double
} deriving (Show)

qmul :: Qt -> Qt -> Qt
qmul a b = Qt
	(qx a * qw b + qw a * qx b + qy a * qz b - qz a * qy b)
	(qy a * qw b + qw a * qy b + qz a * qx b - qx a * qz b)
	(qz a * qw b + qw a * qz b + qx a * qy b - qy a * qx b)
	(qw a * qw b - qx a * qx b - qy a * qy b - qz a * qz b)

qinv :: Qt -> Qt
qinv a = Qt (-(qx a)) (-(qy a)) (-(qz a)) (qw a)

data Vec = Vec {
	vx :: Double, 
	vy :: Double, 
	vz :: Double
} deriving (Show)

vrot :: Qt -> Vec -> Vec
vrot rot vec = vecFromQt (qmul (qmul rot (qtFromVec vec)) (qinv rot))

qtFromVec :: Vec -> Qt
qtFromVec a = Qt (vx a) (vy a) (vz a) 0

vecFromQt :: Qt -> Vec
vecFromQt a = Vec (qx a) (qy a) (qz a)

vproj :: Double -> Double -> Vec
vproj ang rad = Vec ((cos ang) * rad) ((sin ang) * rad) 0

vop :: (Double -> Double -> Double) -> Vec -> Vec -> Vec
vop f a b = Vec (f (vx a) (vx b)) (f (vy a) (vy b)) (f (vz a) (vz b))

vadd :: Vec -> Vec -> Vec
vadd = vop (+)

data Col = Col { 
	r :: Double, 
	g :: Double, 
	b :: Double 
} deriving (Show)

data Pivot = Pivot { 
	pivotLen :: Double, 
	pivotRot :: Qt, 
	pivotRads :: V.Vector Double, 
	pivotCols :: V.Vector Col
} deriving (Show)

data Mesh = Mesh {
	meshRot :: Qt,
	meshCpos :: Vec,
	meshPositions :: V.Vector Double,
	meshColors :: V.Vector Double,
	meshIndices :: V.Vector Int
} deriving (Show)

faceIndices :: Int -> Int -> Int -> Int -> V.Vector Int
faceIndices i j w h =
	if j < (h-1) then
		let	a = j * w + i
			b = j * w + mod (i + 1) w
			c = (j + 1) * w + i
			d = (j + 1) * w + mod (i + 1) w
		in V.fromList [a,b,d,d,c,a]
	else V.fromList []

buildMesh :: V.Vector Pivot -> Mesh
buildMesh pivots = V.foldl' buildLayer initial (V.zip (V.enumFromN 0 height) pivots) where	
	initial	= Mesh (Qt 0 0 0 1) (Vec 0 0 0) (V.fromList []) (V.fromList []) (V.fromList [])
	width 	= V.length (pivotRads (V.head pivots))
	height	= V.length pivots
	buildLayer step (j,pivot) = V.foldl' buildVertices step (V.zip3 (V.enumFromN 0 width) (pivotRads pivot) (pivotCols pivot)) where
		rot 	= qmul (meshRot step) (pivotRot pivot)
		cpos	= vadd (meshCpos step) (vrot rot (Vec 0 0 (pivotLen pivot)))
		buildVertices step (i,vrad,vcol) = Mesh rot cpos positions colors indices where
			vang 		= fromIntegral i / fromIntegral width  * 2.0 * pi
			vpos		= vadd cpos (vrot rot (vproj vang vrad))
			positions	= V.concat [meshPositions step, V.fromList [vx vpos, vy vpos, vz vpos]]
			colors 		= V.concat [meshColors step, V.fromList [r vcol, g vcol, b vcol]]
			indices 	= V.concat [meshIndices step, faceIndices i j width height]

val :: Mesh
val = buildMesh 
	(V.replicate 128
		(Pivot 
			1 
			(Qt 0 0 0 1) 
			(V.fromList [1,1,1,1,1,1,1,1]) 
			(V.fromList [(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1),(Col 1 1 1)])))

main :: IO ()
main = print val
36:22: Warning: Redundant bracket
Found:
(cos ang) * rad
Why not:
cos ang * rad
36:40: Warning: Redundant bracket
Found:
(sin ang) * rad
Why not:
sin ang * rad
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1, (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), Col 1 1 1,
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
Col 1 1 1, (Col 1 1 1), (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), Col 1 1 1, (Col 1 1 1)]
97:37: Warning: Redundant bracket
Found:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), (Col 1 1 1)]
Why not:
[(Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1), (Col 1 1 1),
(Col 1 1 1), (Col 1 1 1), Col 1 1 1]