Pages

Monday, May 5, 2014

More on the rectangles.

If we take the Cartesian sum of a set  A and B,
Where A is the number of rects in the width
and B is the number of rects in the height...

(H * W)/ W =number of Width Rects (subtract one for A_max)
(H * W)/ H =number of Height Rects (subtract one for B_max)

Lets say it's a 4 x 5 rectangle.

So our two sets would be:
A = range(0, A_max)
B = range(0, B_max)
A = {(0, 1, 2, 3, 4)}
B = {(0, 1, 2, 3)}

the Cartesian set would be:
{(0,0), (0,1), (0,2), (0,3), (0, 4), (1, 0), (1, 1)....(4, 2), (4, 3)}

Each of these sets can represent the C and I in this formula,

(x + CW, y + IH)

Now how do I put it in a computer program, and how do I get it to save the results of each coordinates into a new list for the individual rects.... 

I want the program to be able to distinguish from the cartesian set and the formula, a set of individual rectangles.   That way all the rectangles in a map can be altered, or manipulated.

Kinda like a simple paint, but I don't want it to create them as we go.  I want them already gridded out, and then alterable from there. 

Lets say we can put an image in there like in photoshop, and alter it based on the individual rectanglular spots in the grid.

I don't know if this is how they do it already,  But just thinking that might be how the whole CGI stuff works.    Map a set of points, alter them as we see fit.

Except I just want a simple large-ish grid that can make simple sprites that are easily manipulated and moved, just like the Vector Class does in pygame,  but we can just click the squares and go.... I want these to move up by a vector of 2, 3,  these by 3, 4....  and so on until I've made my own animator without downloading a bunch of rediculously complicated software,  or maybe that's how it all already works and I just don't know it.

Either way, I want to create one myself...  cause I want to make simple sprites that move by with code,  not by image translation.
Are they the same thing?

No comments:

Post a Comment