GMU:Einführung ins Programmieren mit Processing/final/Pattern: Difference between revisions

From Medien Wiki
No edit summary
Line 1: Line 1:
== Pattern ==  
= Pattern =


For the final homework, I want to create a pattern, which consist of squares, circles and stars. The shape will randomly selected and tweens to the next shape. At the beginning, the user should click, if the next tween should happened, but I changed it. If a tween is finished, a new shape will randomly selected and the tween starts. The user can control some aspects of the shape.  
For the final homework, I want to create a pattern, which consist of squares, circles and stars. The shape will randomly selected and tweens to the next shape. At the beginning, the user should click, if the next tween should happened, but I changed it. If a tween is finished, a new shape will randomly selected and the tween starts. The user can control some aspects of the shape.  
Line 30: Line 30:
<br clear="all" />
<br clear="all" />


=== PROGRAM ===
== PROGRAM ==
[[File:Processing_einfuehrung_andreas.zip|Download SketchFolder]]
[[File:Processing_einfuehrung_andreas.zip|Download SketchFolder]]


[[Image:Processing_einfuehrung_final_andreas.jpg]]
[[Image:Processing_einfuehrung_final_andreas.jpg]]
<br clear=all />
<br clear=all />

Revision as of 17:27, 14 December 2011

Pattern

For the final homework, I want to create a pattern, which consist of squares, circles and stars. The shape will randomly selected and tweens to the next shape. At the beginning, the user should click, if the next tween should happened, but I changed it. If a tween is finished, a new shape will randomly selected and the tween starts. The user can control some aspects of the shape.

These aspects are:

by pressing a key

  • UP Moves the origin of the shapes 20px up
  • DOWN Moves the origin of the shapes 20px down
  • LEFT Moves the origin of the shapes 20px left
  • RIGHT Moves the origin of the shapes 20px right

by releasing a key

  • a/A adds a new shape on the right, if the current number is below the maximum
  • s/S removes the shape on the right (The minimum is 1 shape)
  • d/D adds a new shape on the bottom, if the current number is below the maximum
  • f/F removes the shape on the bottom (The minimum is 1 shape)

by mouse click

  • Creates a new color for every shape, there will be a tween between the current number and the new one

by moving the mouse

  • It will adjust the distance between the shapes, considering the current origin of the shapes

by adjusting properties in the FinalHomework sketch

  • randomIsOK Will position the shapes in every frame randomly to its origin (not the origin of all shapes)
  • randomValue If randomIsOK, it will be the offset from the origin of the shape
  • resetBackground If the background should be reset, if no: A rectangle will be drawn with the following color
  • bicolor color for the background (without alpha) or for the rectangle (with alpha)


PROGRAM

File:Processing einfuehrung andreas.zip

Processing einfuehrung final andreas.jpg