User Tools

Site Tools


Independent Study - Reed Tomlinson

Completed projects:

  • 3D server/client
  • Music reconstruction through comparison

Project 1: 3D server/client

  • 1 server, 1 or more clients.
== Server (_3DServer.pde) ==
  • Server waits for a certain number of clients to connect.
    • As of now, the number of clients is a constant in the server program (line 19)
  • When a client connects, it sends a string in the form “x,y,z”.
  • The server stores the client x, y and z values once all clients have connected.
    • As of now, this is not done in a nice “for” loop, but is laid out sequentially (lines 29-59)
  • The server takes the original (x,y,z) to be (x[client 1], 0, z[client 1]).
  • Each time draw() is called in the server, x is incremented by 5 and y is decremented by 1 (lines 67-68).
  • Then in draw(), a string is written out in the form “x,y,z-” to all clients. This is the “universal” position.
Client (_3d_client.pde)
  • Client, on connecting, sends “x,y,z” to server- this is the client's original position.
  • In the draw() function, the client receives the “x,y,z-” string from the server.
  • The client subtracts its original x, y and z to get the x, y and z distance of the universal position from this client's original position (lines 43-45). This difference is the relative position of the object to this client.
  • The client draws a cube at the new relative position.
  1. These doesn't function as applets (IP addresses, etc. must be changed), but code is… here? 3dServerClient

Project 1: 3D server/client

tasc/reed_cs_444.txt · Last modified: 2010/05/03 16:03 by tomliar0