Topic: Completion of a map by symmetry
einstein13![]() |
Posted at: 2015-01-28, 14:43
In my opinion we should think about the rotation of pure terrain first. Then we can think about other features. Filling the resources is quite fast. Much more faster than creating the terrain. But altitude can be interpolated from non-approximated positions. So rotate the terrain we are interested in, then interpolate the heights of points. Without approximation of points.
I had another- easier one - idea to do that. Steps to rotate:
Possible features (I have ideas):
For me 45 deg is more important: 2 players: 180=360 deg 3 players: 120=260 deg 4 players: 90 deg 6 players: 60 deg *8 players: 45 deg 30 deg is for 12 players, but can be used in other ways, as well as other possibilities. (part of map has some kind of symmetry, other parts aren't the same.) I like 8-players maps. Then I can play for a loooong time with the AI and like the game (I don't like short games). einstein13 ![]() ![]() |
gnarfk![]() Topic Opener |
Posted at: 2015-01-28, 17:22
are you sure that your new shape will have the same number of edges ? i think it is the most important . and i don't think it will be easy to have this.
Don't forget that we don't have only rotations. We can use translations and symmetries to create fair 8-player maps. combinations i think of could be: 2-player : translations , rotation of 180° , symmetry 3-player : translations , rotation of 120° 4-player : translations , two symmetries (or rotations of 90° which need to be fixed before) 5-player : translations (or rotations of 72° which need to be fixed before) 6-player : translations , rotations of 60° , symmetry + rotations of 120° 7-player : translations (or rotations if fixed ...) 8-player : translations , combinations of symmetries and translations , rotation of 180° and translations, or 2 symmetries and a rotation of 60° (or rotations of 45° if fixed) ![]() ![]() |
einstein13![]() |
Posted at: 2015-01-29, 10:32
No, I'm not sure about this, but I have to test it first.
I know that it is important to have symmetries, but for me fixing rotations is much more complicated. Symmetries are quite easy to implement... I guess Maybe not every, but if we know how to do rotations- symmetries will be much more easier to do Translations is adding a vector- I can do it now, without thinking:
It is basing adding einstein13 ![]() ![]() |
gnarfk![]() Topic Opener |
Posted at: 2015-01-29, 12:44
i know that symmetries and translations are very easy. The point of what i said is : maybe we don't need to fix these non-exact rotations . We could already have a useful tool to create multiplayer maps. ![]() ![]() |
einstein13![]() |
Posted at: 2015-02-02, 09:17
Gnarfk? I have "simple" problem (to this topic!): I have list of points, also I can easily have list of lines. This list creates a figure, shape. Then I pick one (random) point. How can I test if the point is inside the shape or outside? Please consider two cases:
Of course the set has no "holes" inside, so it is... (can't remember the correct word for that einstein13 ![]() ![]() |
gnarfk![]() Topic Opener |
Posted at: 2015-02-02, 10:20
The first idea i think of is to use the jordan's theorem. Let P be a point outside (we can choose a point very far away, or the rotation center, or find something else like a point whoose coordinates are higher that all the corners of your shape) , and M the point which you want to check whether it is Inside or outside. the line (PM) cuts the lines which delimit your shape a certain number n of times (it is easy to comput these , solve 1 equation for each lines of your shape , and i can think of some ideas to make sure these equations have 0 or 1 solution and not an infinite number which can be the case in some situations). If this number n is pair, M is also outside your shape. if n is an odd number, M is Inside your shape. Edited: 2015-02-02, 10:22
![]() ![]() |
einstein13![]() |
Posted at: 2015-02-02, 12:02
that is easy one
This problem is quite complex for computing. Is there any easier way to calculate this?! Why I ask those questions? the idea is to rotate whole shape (ex. square, triangle, complex shape), then find points inside the rotated shape. Then we will save the original shape (a bit approximated to zigzag plane) and -what is more important - save surface area Edited: 2015-02-02, 12:03
einstein13 ![]() ![]() |
gnarfk![]() Topic Opener |
Posted at: 2015-02-02, 12:52
i understand your idea. This could be a way to solve rotation problems. (we would need to fix things like "amount of a ressource in a shape" or things like that) now , here is how could be implemented this idea. We would have shapes defined with a list a_1 a_2 .... a_n points (we define then a_(n+1) = a_1 to close the shape). (i want these coordinates to be algebric numbers , you will see after why, but this condition is not much a problem) We want to know wheter a point P is Inside or outside this shape. Let a_max the point of the list with the higher y-coordinate. Let M be a point of coordinates (x(a_max) ; y(a_max)+ Pi) . (then , coordinates of M aren't algebric, and this will make sure all equations will have 0 or 1 solution, we will never be in a problematic situation with (MP) line following exaclty a segment line of the shape) the (MP) line has a cartesian equation ax + by +c = 0, obtained with scalar product , and a condition : x being between x(M) and x(P) and y being between y(M) and y(P). (EQUATION of (MP) ) each (a_i a_i+1) line has a cartesian equation a_i x + b_i y +c = 0, obtained with scalar product , and a condition : x being between x(a_i) and x(a_i+1) and y being between y(a_i) and y(a_i+1). (EQUATION of (a_i a_i+1) ) let c =0 For i from 1 to n do solve system { EQUATION of (MP) & EQUATION of (a_i a_i+1) } and check if the solution matches the condition if solution found then c+1 -> c EndFor if c is odd then YES else NO ![]() ![]() |
gnarfk![]() Topic Opener |
Posted at: 2015-02-02, 12:58
as the systems will always be of the same type , and as they have everytime a solution, we can even write directly the formula of the solution in the 'solving part' , and then check if the solution is where it should. The computation of this would not be very hard for a computer . the number of operations being not too big. We can extend this algorithm to shapes with holes. (instead of a list of points, give directly the list of equations of all the border-lines with the ranges) On the same principle we will have things that could work on shapes with holes, or shapes with non-linear equation (circles , ellipses, other ...) as long as these equations could be computed , and where the ranges are well defined. Notice : if you can describe your shape as a Union of disks , it will be very easy to compute your problem : a point is in the shape if its distance from one af the disks centers is shorter than its radius. But here , the problem is to find these disks for any type of shape ... Edited: 2015-02-02, 13:13
![]() ![]() |
einstein13![]() |
Posted at: 2015-02-02, 13:30
Yea The computation time (for all the map!) will be about:
We can narrow n_x and n_y by getting n_x_min, n_x_max, n_y_min, n_y_max as a coordinates of ROTATED points:
Then we can consider point P only inside the sqare ((n_x_min, n_x_max),(n_y_min, n_y_max)). -> range notation of square But the most important point is that we should consider only ROTATED points einstein13 ![]() ![]() |