-
Notifications
You must be signed in to change notification settings - Fork 0
/
SimpleCVSpace.m
36 lines (33 loc) · 1008 Bytes
/
SimpleCVSpace.m
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
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Core Model, 2022
% Written by Maya Davis
% Concept by Maya Davis and Melissa A. Redford
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% SimpleCVSpace
function space = SimpleCVSpace()
spaceTransformation = SpaceTransformation(@MPTransformation);
Clusters = MakeManyHyperCubeClusters([0 0], [1 1], [3 3], ...
[2 15], [6 2], spaceTransformation);
space = Space(Clusters, spaceTransformation);
end
function PCoord = MPTransformation(MCoord)
% If it's a consonant
if MCoord(2) < 10.5
if MCoord(1) < 10
PCoord = [10; 0] + MCoord;
elseif MCoord(1) < 20
PCoord = [-10; 0] + MCoord;
else
PCoord = MCoord;
end
% Otherwise, it's a vowel
else
if MCoord(1) < 10
PCoord = [20; 0] + MCoord;
elseif MCoord(1) < 20
PCoord = [-10; 0] + MCoord;
else
PCoord = [-10; 0] + MCoord;
end
end
end