Log in

No account? Create an account
Rotten Circuits
February 14th, 2010
08:49 am


Previous Entry Share Next Entry
Happy Valentine's Day, Hazel!
I made Hazel a Valentine's day present, but she might not like it because you have to install a plugin ;)

Plugin here: http://unity3d.com/webplayer/


(4 comments | Leave a comment)

[User Picture]
Date:February 14th, 2010 02:13 pm (UTC)
Yay! It looks like blood cells. :3
[User Picture]
Date:February 15th, 2010 11:57 am (UTC)
Tis definitely corpuscular :D

Take it you're liking Unity, then, Ian?
[User Picture]
Date:February 15th, 2010 12:38 pm (UTC)
So far, yeah. It's brain-numbingly simple to use, but pretty powerful.
(Deleted comment)
[User Picture]
Date:February 21st, 2010 01:16 pm (UTC)

Re: cooool

Hi! I have no Russian at all, so I'm relying on Google Translate, but I'm glad you found it interesting :)

The pattern of hearts is a complex rotation along the surface of a sphere. each heart is positioned using the same set of rotations, but at different progressions - so they all travel along the same path, but some are much slower than others.

The rotation is applied to the heart using the centre of the sphere (the stationary heart) as a pivot, so that they travel along the surface. It is a rotation about the world axes x, y and z, with different factors for each - if I remember right it is (time * rotation * 0.5) for x, 1.0 for y and 1.5 for z.

So, the each heart position is:

rotate offsetFromCentre through x by (time * speedOfFrontHeart * 0.5 * (indexOfThisHeart / numberOfHearts);
rotate offsetFromCentre through y by (time * speedOfFrontHeart * 1.0 * (indexOfThisHeart / numberOfHearts);
rotate offsetFromCentre through z by (time * speedOfFrontHeart * 1.5 * (indexOfThisHeart / numberOfHearts);

As the calculation is linear, it doesn't cost any more later in the application than at the start - the limiting factor, instead, is the number of hearts and the complexity of the heart mesh.
Powered by LiveJournal.com