About | Rules and Guide | Sign In/Create Account | Write a Post
Construction1990’s Internet Montage? No!
Please excuse the site weirdness. Mike is fixing and making things.
Ludum Dare 31 — Coming December 5th-8th 2014!

  • ??? Begins: in 7 days, 19 hours, 26 minutes, 25 seconds
  • October Ends: in 8 days, 19 hours, 38 minutes, 25 seconds
  • Ludum Dare 31 begins: in 43 days, 20 hours, 26 minutes, 25 seconds
  • (FYI: Clock might be off) | Ludum Dare 31: Real World Gatherings (Now Open!)

    [ October Challenge 2014 | Resources | Submit/Edit | View All ]

    LD 24: Creating procedural critters

    Posted by
    September 12th, 2012 9:00 am

    How do you create theses insect/plant like critters


    from these basic shapes?


    That was the question I posed myself for the Ludum Dare 24 compo. The theme was evolution and I wanted to create some little critters which could change there appearance smoothly.

    The basic shapes you see above can be easily described using polar coordinates.

    Polar coordinates express a 2D curve in the form r(t). For each angle t the function r(t) gives the radius at this angle. Here are the definitions of the simple shapes above:

    • Sphere: r(t) = 1 (a circle has constant radius)
    • Star: r(t) = r0 + (1-r0)*(1-abs((n*t mod 2 pi)/pi-1))^p. This is a bit complicated – I could not find an easier definition. n is the number of star corners and r0 and p are additinal parameters.
    • Rose: r(t) = cos(n*t), where n is the number of rose petals.
    • Cardioid: r(t) = 1 + cos(t + pi). This is a funny mathematical object.

    Now how do we get the complex shapes? Easy: they are formed buy just using a linear combination of the simple shapes.

    For example we use the two simple shape functions r_star(t) and r_cardioid(t) and form the linear combination r(t) = a*r_star(t) + b*r_cardioid(t). Using a and b equal to 0.5 yields the third shape you can see above.

    You can use my critter generator to create your own critters.

    Also, play and rate my compo entry!

    Tags: , , , ,

    Leave a Reply

    You must be logged in to post a comment.

    All posts, images, and comments are owned by their creators.

    [cache: storing page]