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

From Medien Wiki
(Created page with "== 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...")
 
No edit summary
Line 5: Line 5:
These aspects are:
These aspects are:
<p>''by pressing a key''</p>
<p>''by pressing a key''</p>
<ul>
* UP Moves the origin of the shapes 20px up
<li>UP Moves the origin of the shapes 20px up</li>
* DOWN Moves the origin of the shapes 20px down
<li>DOWN Moves the origin of the shapes 20px down</li>
* LEFT Moves the origin of the shapes 20px left
<li>LEFT Moves the origin of the shapes 20px left</li>
* RIGHT Moves the origin of the shapes 20px right
<li>RIGHT Moves the origin of the shapes 20px right</li>
</ul>


<p>''by releasing a key''</p>
<p>''by releasing a key''</p>
<ul>
* a/A adds a new shape on the right, if the current number is below the maximum
<li>a/A adds a new shape on the right, if the current number is below the maximum</li>
* s/S removes the shape on the right (The minimum is 1 shape)
<li>s/S removes the shape on the right (The minimum is 1 shape)</li>
* d/D adds a new shape on the bottom, if the current number is below the maximum
<li>d/D adds a new shape on the bottom, if the current number is below the maximum</li>
* f/F removes the shape on the bottom (The minimum is 1 shape)
<li>f/F removes the shape on the bottom (The minimum is 1 shape)</li>
</ul>


<p>''by mouse click''</p>
<p>''by mouse click''</p>
<ul>
* Creates a new color for every shape, there will be a tween between the current number and the new one
<li>Creates a new color for every shape, there will be a tween between the current number and the new one</li>
</ul>


<p>''by moving the mouse''</p>
<p>''by moving the mouse''</p>
<ul>
* It will adjust the distance between the shapes, considering the current origin of the shapes
        <li>It will adjust the distance between the shapes, considering the current origin of the shapes</li>
</ul>


<p>''by adjusting properties in the FinalHomework sketch''</p>
<p>''by adjusting properties in the FinalHomework sketch''</p>
<ul>
* randomIsOK Will position the shapes in every frame randomly to its origin (not the origin of all shapes)
        <li>randomIsOK Will position the shapes in every frame randomly to its origin (not the origin of all shapes)</li>
* randomValue If randomIsOK, it will be the offset from the origin of the shape
<li>randomValue If randomIsOK, it will be the offset from the origin of the shape</li>
* resetBackground If the background should be reset, if no: A rectangle will be drawn with the following color
<li>resetBackground If the background should be reset, if no: A rectangle will be drawn with the following color</li>
* bicolor color for the background (without alpha) or for the rectangle (with alpha)
<li>bicolor color for the background (without alpha) or for the rectangle (with alpha)</li>
</ul>


<br clear="all" />
=== PROGRAM ===
[[File:Processing_einfuehrung_andreas.zip|Download SketchFolder]]
[[Image:Processing_einfuehrung_final_andreas.jpg]]
<br clear=all />
<br clear=all />

Revision as of 16:32, 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