Arduino - Accelerometer - Processing

someone please help me,
i want to make some simple 3D object using processing,
and then it can move according to data from 3-axis accelerometer

could someone share ur simple code?
because im still newbie in processing

There are three steps here.

  1. Write a sketch on the Arduino that can send packetized accelerometer data to the serial port.
  2. Write a sketch in Processing that can read the data sent in step 1.
  3. Incorporate the sketch from step 2 into, for example, the RGBCube example sketch in Processing, to replace mouse control with data read from step 1.

What have you done so far?