This topic is now archived and is closed to further replies.


Using software to texturemap a circle. Think "Radar"

Recommended Posts

Succinct    169
Ok - drawing a radar image in software. The data coming in is represented in slices. Each slice of data represents the colors that should go into a pie slice of a circle from the center to the outside - a sector. However, the data is just enough data to draw a single line, the big problem is filling the area of each pie slice with linear data. Now - the first idea was to just draw single lines out from the center of the circle. This made sense as the data is just a single line, and it was more of an idea just to see if the circle would look somewhat like the data. The problem here is that you''re basically drawing a pinwheel, as you don''t have the entire set of data that would go between the individual lines. There was no easy way to completely fill the circle using lines with out a significant amount of overdraw and drawing lots and lots of lines. The next idea was to go back to the original way of filling polygons - finding an edgelist for each scanline and filling between those edges. Basically this involves finding for each y scanline the x extents of the circle on that y scanline. Then, once you have the x extents, all you have to do is fill from x1 to x2, for each scanline, and the entire circle is filled. Now - this bring about another problem - what to put into each pixel this way. The mapping seems like it''s going to be very complex. Anyone have any ideas? Last thing is how the incoming data is represented: It is a 2d image where each scanline represents from the left hand side the center of the circle, and the right hand side represents the outside of the circle at a particular angle. The circle drawn should have as many "sectors" as there are scanlines. Thank you for your bandwidth, -- Succinct

Share this post

Link to post
Share on other sites