Describing shapes in computational geometry

I read a bit about computational geometry a longer while ago and also studied a few source codes related to this topic and some sort of "ahhh!" stuck when coming to the point where the actual operation between two shapes happens. Everytime I'm sthinking about generalizing shape and position descriptions, I'm remembering computational geometry and how cleverly written this one implementation was. They took the idea of describing polygons either clockwise or counterclockwise and only altering their direction when doing logic operations. Though I'm not programming all day right now, I'm taking my time to think about it cause it may be beneficial for alle my later projects where I want to describe polygons of artifical or procedural origin. I always wondered how to this and now I finally got the intention. In essence, I guess I'd only need to add line intersection and I can create all kinds of shapes. Another point is polygon collision detection. If one can create new shapes by using logic operations on other shapes, there's definitely the possibility to check whether some shapes collide. Moreover, a detailed collision shape can provide much more information about a collision than a set of true/false-returning mathematical calculations.

It's like getting the time to tackle a few old unpleasant stories once more but becoming successful in the end. I like how creative I began after switching to C. It gives me more time to focus on my actual problems and their appropriate solutions instead of falsely tinkering with describing theoretical models and constructs rather than producing useful stuff.

No comments: