Interactive Visual

In my project I wanted to do something different that is not a game and more to the visual than my other one I did at the begging of programming.

Spinning visual of a sphere rotating on x-axis with another objecting rotating on both axis’ where as you click you can look around while it is rotating. Changes background colors with any button pushed.

 rotateY(frameCount * .01);
  rotateX(frameCount * .02);

This is what makes the sphere look like it is moving around the screen while it is staying still and the object made up of multiple spheres is actually turning

  for(var i = 0; i <= 12; i++){
    for(var j = 0; j <= 12; j++){
      var a = j/12 * PI;
      var b = i/12 * PI;
      translate(sin(2 * a) * radius + sin(b), cos(b) * radius / 2 , cos(3 * a) * radius * sin(b));
      if(j%2 === 0){

This is what makes the actual structure that is made up of the spheres and any changes to these few lines of code can make to structure change drastically and make it rather than a cylinder the object can become multiple shapes and also be made up of more than just spheres.

This has lots of things that can be done that would change how it acts and looks, like the background changing colors randomly every time a key is pressed.

Some problems I encountered, wasn’t much I could really add to the program and hit a lot of limitations from my own lack of knowledge to certain things I couldn’t add which lead to it being more about thinking about it than actually doing anything in the code.

The hope of my project was to make a visual that is relaxing with some user input that makes it so that it doesn’t get boring quickly but rather it can be entertaining and also you could just sit back and watch it revolve around in the world.

This would probably be seen as what not to do for a project just because of the simplicity of it but things I wanted to or tried to add did not work most of the things I tried and wanted to add ended up coming back as errors some things could stay and made some improvement on the project but had to be changed from the original idea to a smaller working version.

This is the like to the working visual


Leave a Reply

Your email address will not be published. Required fields are marked *