Writing a Short Message by Processing(java)

We will learn how to write short message by Processing(java). I have used color in my instructable so that my text looks attractive. The dots in the background will also move.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Ramadan Mubarak

This is my second instructable. In this instructacle I will tell how to write short message by processing(java)

The code:

import processing.sound.*;
SoundFile file;

int unit = 40; int count; Module[] mods;

void setup() { size(640, 360); file = new SoundFile(this, "o Mon Romjaner Oi Rozar Sheshe.mp3"); file.play(); noStroke();

int wideCount = width / unit; int highCount = height / unit; count = wideCount * highCount; mods = new Module[count];

int index = 0; for (int y = 0; y < highCount; y++) { for (int x = 0; x < wideCount; x++) { mods[index++] = new Module(x*unit, y*unit, unit/2, unit/2, random(0.05, 0.8), unit); } } }

void draw() { background(0); fill(255,255,255); ellipse(56, 46, 55, 55); textSize(60);

text("Ramadan Mubarak", 10, 130); fill(0, 102, 153); text("Ramadan Mubarak", 10, 160); fill(0, 102, 153, 51); text("Ramadan Mubarak", 10, 190); for (Module mod : mods) { mod.update(); mod.display(); } }

We have used sound in this instructable. So we will have to download sound from youtube and convert it into

mp3.

The link for downloading the song:

https://www.youtube.com/watch?v=Mmn0h1PSfrU

Be the First to Share

    Recommendations

    • Instrument Contest

      Instrument Contest
    • Make it Glow Contest

      Make it Glow Contest
    • STEM Contest

      STEM Contest

    Discussions

    0
    None
    NUSRATRAHMAN

    3 years ago

    You don't need to find my mistake . Find your own mistake. I know how to write an instructable. However , you shouldn't write these type of comment here. I will find my own mistake and my sir is there to correct my mistake. I don't need your advice to write an instructable