Topic: Completion of a map by symmetry
gnarfk Topic Opener |
Posted at: 2015-01-22, 09:27
i'm mathematician and i can tell you that here , we don't even need cos or sin .... i'll write you formulae soon , when i'll have the time to read the post about geometry and the way coordinates are implemented in WL (i saw that columns "zigzag" so i've to solve this very little problem)
that's what i thought , with unbuildable desert , or swomp , or snow , or lava , or .... Top Quote |
einstein13 |
Posted at: 2015-01-22, 17:39
Yes, most of background is unvuildable for maps (water), but sometimes people want to have buildable ones (green grass). It should be another option to build a whole world with one background first. And how can you make rotation without sin/cos function? Rotation with 30, 45, 60, ... degree? Is it possible? Maybe yes (on triangle-shaped map), but for me it is too much work and it is quite in unobvious for lots of people. But if you do it clearly, I can explain it (I like explanations ;P ) einstein13 |
gnarfk Topic Opener |
Posted at: 2015-01-22, 18:00
in our triangle shaped map , rotations of 60° are easy to write without cos/sin. to get the expression of a linear application, we only need the images of 2 non-colinear vectors. Here if we choose for the base : vector that moves right . (1;0) vector that moves top (between top right and top left , it doesn't fall exactly on a vertex of the map but it isn't a problem). (0;1) the rotation of 60° of the first one will be (0.5 ; 1) . and the rotation of the second one will be ( -0.75 ; 0.5). with that , we get the expression of our rotation. then , if a vertex is at coordinates (x ; y ) (from the rotation center) , its image will have coordinates ( 0.5 x - 0.75 y ; x + 0.5 y ) in the right coordinate-system , we do not need neither cosine nor sine functions. Edited: 2015-01-22, 18:00
Top Quote |
wl-zocker |
Posted at: 2015-01-22, 19:58
Wouldn't it be easier to use two vectors parallel to triangle sides as a base (e.g. (1; 0) and (0.5; 1) in your coordinate system)? That should avoid fraction numbers (the coordinates have to be integers). The next problem is how the triangles change: right/down may be swapped, and maybe they even change the field they belong to. "Only few people know how much one has to know in order to know how little one knows." - Werner Heisenberg Top Quote |
gnarfk Topic Opener |
Posted at: 2015-01-22, 20:13
to be honest , my first idea was this base, but it doesn't match with the actual coordinate system. althought it is possible to calculate new coordinates for this. (in this base with the "right" and "top right" vectors , rotation of 60° is : (x , y ) -> ( - y , x + y ) ) this "non integer" system i used in my last post the closest to the one which is used . we only have to add the 0.5 to some vertices , depending on whether they are on the right or left side of the zig zag. (and to remove these 0.5 if needed afterwards to have integer coordinates) for the triangles , down becomes the right of his image , and right becomes the down triangle of the images top right neighbour ... Edited: 2015-01-22, 20:18
Top Quote |
einstein13 |
Posted at: 2015-01-23, 01:42
You calculated sine and cosine functions and paste final values. But this things aren't universal. If we want to make any other rotation, we have to create another function/ method. After 6 different rotations (30, 45, 60, 90, 120, 180 deg) we will have 6 very simmilar functions, one for each rotation degree. My idea is to have only one function for every rotation. It can calculate sine and cosine value once, create matrix (2x2), maybe modified a little (for zig-zag map) and then calculations of rotations will be only multiplying and sums, as your explanation. For me it will be easier to test and modify, if needed. einstein13 |
gnarfk Topic Opener |
Posted at: 2015-01-23, 06:19
No i didn't. These values were not calculated with sine and cosine. we don't use a "orthonormal base". (if this were the case, we would have needed sine and cosine ...)
The 60° rotation is natural with our triangle structured map. Rotations of angles that are not multiples of 60 will have bad results, as the image of vertex of the map will not be a vertex ....
with my function it is possible to have rotations of 60°,120°,180°,240°,300° with only 1 function, as we can use the rotation multiple times to get the other. Top Quote |
LAZA |
Posted at: 2015-01-23, 12:55
+1 for that option. especially while playing the map "Desert Tournament" (in the tournament) this map is regard to this point a bit unfair:
So the player(s) sitting in the south has to circle around and therefore needs an important (extensive) furthermore wider expansion than the other player(s). * Dell X58 * |
einstein13 |
Posted at: 2015-01-23, 16:25
Yes, that values were not calculated with sine and cosine, but still they are connected to them in (almost) stright way.
Why not? Why don't we go from zig-zag to ortonormal? Then we can use casual transformations, instead of creating something new.
And why do you avoid sine and cosine? It isn't paintful for computers They love calculations
Yes, it is. But any other degree will be innatural for the structure. This is mainly because of the descrete structure. But to fix this we can use interpolations. This is easy for me I have to do something simillar (interpolation for nonlinear function with discrete points) for another project and it isn't as much problematic, as you think
Ok, fair point But still we have to consider rotations for 30, 45 and 90 degree einstein13 |
gnarfk Topic Opener |
Posted at: 2015-01-23, 18:45
Well , here we have to make a choice (or to go in both directions). First choice : we wanted to use these rotations to make things FAIR, so things have to be exactly the same. In this case we need to stay in the isometry group of the hexagon . ( 6 symetry axles and rotations of 60 , 120 etc .... but it will be easy to create maps with 2 , 3 , 4 , 6 or 12 equivalent starting positions , and translations can be used also to create maps with any number of equivalent starting positions) Second choice : we want to have the most possible transformations. But in this case , we will need interpolations. it will not be easy to keep everything equal in this case. Edited: 2015-01-23, 19:16
Top Quote |