🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

drawing only outlines

Started by
6 comments, last by fakemind 22 years, 6 months ago
lets say we have a particle system of circles that can pass through each other. each circle is colored green, with a bright red outline around it. ok, when two of the circles overlap, i want them to still be colored green, but only their combined outlines colored red. and if you had a bunch of them overlapping then only the outline of the combined balls would be colored. if that doesnt make sense, just let me know, and i''ll try and draw a picture of what i mean and post it here. - jeremiah http://fakemind.com
- jeremiah http://fakemind.com
Advertisement
Render the outlines first, and then the circles will cover up any that aren''t around the edges^^


-Deku-chan

DK Art (my site, which has little programming-related stuff on it, but you should go anyway^_^)
yeah but then the outline of one circle will 'cut' through the other circle.

the way I have done this kind of thing in the past is to create a new outline for the shape by using line intersection algorithms to find where the outlines intersect each other.

add points to the new outline where the intersections occur and discard any information that lies 'within' the new shape.

Make sure each shape is clockwise oriented (or anti-clockwise) so that as you follow the shapes round point by point you are always going round in the same direction.



Edited by - JY on December 5, 2001 2:53:13 PM
"Absorb what is useful, reject what is useless, and add what is specifically your own." - Lee Jun Fan
quote: Original post by JY
yeah but then the outline of one circle will ''cut'' through the other circle.

NO!
Read it again.
Bad ASCII art follows:

Draw the outline of the first circle  #### #    ##      # #    #  ####Draw the outline of the second circle (causing overlap)  ######## #   ##   ##   #  #   # #   ##   #  ########Draw the fill for the first circle  ######## #****#   ##******#   # #****#   #  ########Draw the fill for the second circle  ######## #********##**********# #********#  ######## 


-Snork

"Get busy livin, or get busy dyin."

Edited by - Snork on December 5, 2001 4:08:21 PM
"Get busy livin', or get busy dyin'."
Snork, what is that quote from? I remember it, but I can''t remember the source!
It''s from one the best movies ever made, Shawshank Redemption.

Always remember, you''''re unique. Just like everyone else.
Always remember, you''re unique. Just like everyone else.Greven
Yes, the Shawshank Redemption.

Great movie.

-Snork
"Get busy livin', or get busy dyin'."

This topic is closed to new replies.

Advertisement