Re: Dante's Loader Imports. (Update: Extras - Teacher/Librarian Skirt)
Dante said:
Modguy, I may need to catch you on the IRC sometime for a coding lesson if you got the time. I've got all my components for x-ray ready...ish
The Penis is 18 parts. 16 interlocking circles, plus tip and base. I have no idea where to begin with coding them to animate.
I thought I had no idea, but I went ahead and threw my idea at flash and it worked somehow.
Half the algorithm, second half should be simple to implement, issue of clipping could ruin everything.
Here the blue line is a "smoothed" version of the two arbitrary vectors v1 and v2 (black) which sum to the red line v3. Green is midpoint of v3 to where v1 meets v2.
Blue uses a really awful algorithm to take a line between a changing end point and the same start point. As such it produces numerous slightly varying gradients.
When we jam a bunch of these lines end to end, using these slightly changing gradients we get a curve. Basic idea, right?
How about the following idea (This one is pretty terrible too):
Create a "border" of circles along the walls of her throat, sort of like a barrier.
For each circle in our list of segments...
If our circle intersects with a barrier (Distance between centres < sum of radii)...
Move our circle away from barrier, include all following segments.
Repeat until no more collisions, make sure to also check previous segments and move away from that too.
Eventually, hopefully even, we should have all circles move "Through" our barrier resulting in no collisions. (Or just a horrible crash.)
Could easily be implemented if I could find that circle physics thingy from a while back. (How long till anon says "Hey box2d lol fufufu")
Seriously easier than my method, and would remove all clipping assuming the barrier is complete enough.