|
-
December 8th, 1999, 12:17 AM
#1
Transform and Image
I am trying to transform and image from a square into a triangle is there away to do this?
Thank you,
Jeremy H.
-
February 9th, 2000, 08:26 AM
#2
Re: Transform and Image
Probably no built in way, wut with some or other formula and a 3-D array (width*height*3) you should be able to do it. The 3 at the end is for Red, Green and Blue. Use the formula to copy froma rectangular image to the parts of the array yo u want to draw to. Each cell of the triangle contains the average of the color values squeezed over it. For the standard equilateral the top row would have the average of all top pixels of the source square, the and bottom row of the triangle and the bottom row of the square would be identical. Just play with it until it works. You could also try dropping pixels to make it fit instead.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|