Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Brian Fisher
On Wed, Apr 2, 2008 at 3:49 PM, Kamilche <[EMAIL PROTECTED]> wrote: > Brian Fisher wrote: > The resulting tile can be any shape, I don't care. I may have coded it up > wrong, but it appeared Pete's code resulted in something that didn't tile. > Pete's code wasn't complete, but after fixes for rota

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Kamilche
Brian Fisher wrote: So why do you need a rectangular tile to tile? why not tile a rotated image on a rotated grid? (i.e. like with Pete's code) The resulting tile can be any shape, I don't care. I may have coded it up wrong, but it appeared Pete's code resulted in something that didn't tile.

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Brian Fisher
So why do you need a rectangular tile to tile? why not tile a rotated image on a rotated grid? (i.e. like with Pete's code)

Re: [pygame] Tiling a Rotated Bitmap (along the unrotated axes)

2008-04-02 Thread Dave LeCompte (really)
"Aaron Maupin" <[EMAIL PROTECTED]> wrote: > Other angles will repeat, too, but like Brian says, they'll be > disgustingly large. As in many, many times the size of the original tile. Some of the new tile sizes will be large, but they don't need to be "many, many times" the size of the original t

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Aaron Maupin
Brian Fisher wrote: but if you want to make a rectangular tile that tiles on a rectangular grid from your rotated image, then that is more complicated (unless the rotation is 45 and the original image square - which is what Aaron was talking about), but I would guess it can be done, but may resu

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Kamilche
Well, that was interesting, but also didn't work. It's similar to my attempt of tiling then rotating then cutting a piece out of the middle. I've modified the code to show what happens when that tile is tiled. Interesting, tho! --Kamilche import pygame import math filename=r"G:\Incarnation\

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Brian Fisher
there were 3 problems with the thing above --- the major problem was that sin & cos work in a space where +y is up, pygame in a space where +y is down a minor problem was that the four corners will never be visible at all (think about the surface rotate produces - the bounds go through the four cor

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Kamilche
Pete Shinners wrote: I would expect you could do this. You'll need to rotate the surface, and then blit it back onto itself 8 times with offsets. The offsets will be the rotated corners of the original image rect. Yeah, it didn't work. It seems like it should, but run the following code (y

Re: [pygame] Tiling a Rotated Bitmap

2008-04-02 Thread Pete Shinners
Kamilche wrote: Hi all. I'm trying to create a rotated tilable bitmap out of a tilable bitmap, but it's not working. My first attempt was to tile the bitmap across a larger picture, rotate the larger picture, and then cut a tile out of the middle, but that didn't work - the resulting picture wa

Re: [pygame] Tiling a Rotated Bitmap

2008-04-01 Thread Kamilche
Well, basically, I want to take a picture, rotate it 15 degrees, and use some algorithm to jam all the pixels lying outside the bounding box back inside the box, and have the result be tilable. I thought it should be possible, but it's a thornier problem than I realized. --Kamilche

Re: [pygame] Tiling a Rotated Bitmap

2008-04-01 Thread Brian Fisher
On Tue, Apr 1, 2008 at 8:32 PM, Aaron Maupin <[EMAIL PROTECTED]> wrote: > That will only work if you rotate the bitmap 45 degrees. (Or some > multiple of 45 degrees ;) > You may be right about particular rotation implementations, but in general taking a tile and rotating it and expecting it tile

Re: [pygame] Tiling a Rotated Bitmap

2008-04-01 Thread Aaron Maupin
Kamilche wrote: My first attempt was to tile the bitmap across a larger picture, rotate the larger picture, and then cut a tile out of the middle, but that didn't work - the resulting picture wasn't tilable. That will only work if you rotate the bitmap 45 degrees. (Or some multiple of 45 de

Re: [pygame] Tiling a Rotated Bitmap

2008-04-01 Thread Brian Fisher
when you say the resulting picture is not tileable - what exactly do you mean? (screenshot?) do you mean that you see seams (dark or partially transparent lines through the joints between tiles) when you try to draw the tiles next to each other? If you do, it's probably an alpha problem (using rot

[pygame] Tiling a Rotated Bitmap

2008-04-01 Thread Kamilche
Hi all. I'm trying to create a rotated tilable bitmap out of a tilable bitmap, but it's not working. My first attempt was to tile the bitmap across a larger picture, rotate the larger picture, and then cut a tile out of the middle, but that didn't work - the resulting picture wasn't tilable.