Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Programming a robot

Name: Anonymous 2009-12-29 16:24

I want to create a 3d mapping system (in java) that starts out from nothing but an X. The robot will go out from that X and measure things (temperature, location, acceleration, vibrations, time and other measurements). Some of this data (mostly X,Y,Z locations) should begin to create a 3d map. It would be nice if a java object that puts a "dot" on the X,Y,Z coordinates. the java.

The java object should read from a text file that my computer would upload to the web server.

Name: Anonymous 2009-12-29 19:33

Here OP, this should get you started with your homework.

public final class Point
{
    public final int x, y, z;
// If Java doesn't support this declaration syntax then kick James Gosling in the nuts from me.
   
    public Point(int x, int y, int z)
      {
        this.x = x;
        // etc, kick JG in the ass for not giving a concise way to do this
      }

    public int hashCode()
      {
        //TODO: OP look this shit up and do at least some of yr homework.
      }
}

public class MeasureMents
{
    private int accelleration
}

public class Wobot
{
    private Point location;
    private Map<Point, Map<String, Object>> threeDeeMap;
   
    public Wobot()
      {
        threeDeeMap = new HashMap<Point, <Map<String, Object>>();
      }

    public goToPoint(Point newPointToGoTo)
      {
        location = newPointToGoalTo;
      }
  
   public measureQty(String qtyName, Object qtyVal)
     {
        getDataAtCurrentLocation().set(qtyName, qtyVal);
     }

  private Map<String, Object> getDataAtCurrentLocation()
    {
       Map<String, Object> data;
       if(threeDeeMap.hasKey(location)
         {
           data = threeDeeMap.get(location);
         }
       else
         {
           data = new HashMap<String, Object>();
           threeDeeMap.set(location, data);
         }
      return data;
    }
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List