geometry

Could someone be kind enouth to tell me how i could make a aplication do this

Place a arck on a panel and specify points on it to serve as a rotracter. then make the software calculate the angle of two lines representing a road from a moving camera!

Im other words. the road in the moving image would be the two lines that i require something to mesure angles at a specified point! prosses a event such as make something happen and mesure the angle again within split second intervals (or quicker)

[516 byte] By [goloma] at [2007-10-2 21:07:16]
# 1

I would like to add that i shal be putting a website online shortly where i have a more detailed description of what i require! Also you can descuss you ideas and join me for a great freelance opertunity. You will be entitled to a percentage of the finneshed product! my e-mail address is golomgol@hotmail.co.uk

Message was edited by:

golom

goloma at 2007-7-13 23:52:53 > top of Java-index,Java Essentials,Java Programming...
# 2
Which part do you need help with?You will find that asking specific questions instead of open ended questions like "can someone help me with my assignment" will get you better answers.
Mr_Meea at 2007-7-13 23:52:53 > top of Java-index,Java Essentials,Java Programming...
# 3

Thank u for your response. Mainly plotting the points on a ach. so that it acts like a protracter! and if possable how to make it read a angle at a point i have specified!

unforuantly i have not got my computer with the source code on it. but any hellp you could give me would be apreciated!

goloma at 2007-7-13 23:52:53 > top of Java-index,Java Essentials,Java Programming...
# 4
You can draw a circular arc using the drawArc method of Graphics class.Calculating points on a circular arc is trivial:x = center_x + radius*Math.cos(angle);y = center_y + radius*Math.sin(angle);
Mr_Meea at 2007-7-13 23:52:53 > top of Java-index,Java Essentials,Java Programming...
# 5

Thank you for your response! I need to spescify the points on the arch so that when i put a rolling image onto the panel i can secify a pint on the image to wich a angle should be read from, The software needs to calculate it uickly and make a robotic arm tern to the angle of specified point

in other words

say i marked the left side of the arch a, the right sde b and the middle c

I would need the machine to calculate the angle of point d. wich would be at a point that i intend to mark on a rolling camera

goloma at 2007-7-13 23:52:54 > top of Java-index,Java Essentials,Java Programming...
# 6
Your question doesn't make much sense. Could you elaborate.
Mr_Meea at 2007-7-13 23:52:54 > top of Java-index,Java Essentials,Java Programming...
# 7

I need to place a rolling image onto a panel with a arch on it. the rolling image will be of a road as i am making the worlds first ever self driving car!

The arch shall be used so that if i was to mark the left side of the road L

and th right side of the road r. The arch should be able to calculate how far the steering wheel should have to tern to keep the car on the right side of the road!

goloma at 2007-7-13 23:52:54 > top of Java-index,Java Essentials,Java Programming...
# 8

> as i am making the worlds first ever self driving car!

Well, that has been done before:

http://www.bbcenglish.com/tv/engzone/mw_driv_1.htm

and:

http://www.google.com/search?hl=en&q=%22self+driving+car%22&btnG=Google+Search

So now you can focus on learning Java from the beginning:

http://java.sun.com/docs/books/tutorial/getStarted/index.html

Good luck.

prometheuzza at 2007-7-13 23:52:54 > top of Java-index,Java Essentials,Java Programming...
# 9

Thank you for the links, i guess ill have to re think!

Could u please tell me if this code should work as my gui is not working at the moment and i have not made a frame for a long time

package satlama;

import java.awt.Component;

import satlama.*;

import java.lang.object;

/**

* Title:Kit

* Description:

* Copyright:Copyright (c) 2006

* Company:

* @author craig

* @version 1.0

*/

public class satlama extends Component {

//make components for ui

jmenubar mb = new jmenubar();

jmenu File = new jmwnu("File");

jmenu Help = new jMenu("Help");

//make menuitems starting with file

jmenuitem New = new jmenuitem("New Location");

jmenuitem Open = new jmenuitem("Open");

jmenuitem save = new jmenuitem("Save");

jmenuitem saveas = new jmenuitem("Save setting");

jmenuitem Import = new jmenuitem("Import");

jmenuitem Help0 = new jmenuitem("Help online"); // last of menus

// construct the frame

public static void main (String args[]) {

Frame f = new Frame(); //make frame

Panel p = new Panel(); // make main panel

f.setBounds (0,0,500,500); //set size

f.setVisible(true); //make visable

JPanel contentPane = new JPanel(new BorderLayout()); //make contentpane

contentPane.setBorder(BorderFactory.createraisedBevel(0, 0, 500, 500)); //set Border of contentpane

f.setContentPane(contentPane);

f.addWindowListener(new WindowAdapter() {

public void windowClosing(WindowEvent e) { System.exit(0);}

});

f.add(contentpane);

contentpane.add(p,borderlayout.centre);

contentpane.add(mb,borderlayout.North);

//add menus to mb

File.add(mb);

Help.add(mb);

//add items to menu a

File.add(New1);

File.add(Open);

File.add(save);

File.add(saves);

Help.add(HekpO); // last of menu items

f.setmenubar(mb);

}

public satlama() {

}

public static void main(String[] args) {

satlama satlama1 = new satlama();

}

}

I think this should desplay a Frame that is 500 in width and five hundred in height! Is that right!

Also how would i make a new page be desplayed on the ui (a blank document) from a menu

goloma at 2007-7-13 23:52:54 > top of Java-index,Java Essentials,Java Programming...
# 10

> Could u please tell me if this code should work as my

> gui is not working at the moment and i have not made

> a frame for a long time

You can ask your compiler if your code should or shouldn't work. My gues is it shouldn't.

These are the first three lines of your code:

1 - jmenubar mb = new jmenubar();

- There is no jmenubar among Java's standard classes (class names are case sensitive in Java!).

2 - jmenu File = new jmwnu("File");

- Don't call a variable File: variable names shouldn't start with a capital, and there is a class in the java.io-package called File; it's confusing calling your variable that way.

- Again; there is no such class called jmenu or jmwnu

3 - jmenu Help = new jMenu("Help");

- And again; there is no such class called jmenu or jMenu

This is my last post to you and I end it by telling you again: start from the beginning:

http://java.sun.com/docs/books/tutorial/getStarted/cupojava/index.html

http://java.sun.com/docs/books/tutorial/java/index.html

http://java.sun.com/docs/books/tutorial/essential/index.html

and

http://java.sun.com/docs/books/tutorial/

prometheuzza at 2007-7-13 23:52:54 > top of Java-index,Java Essentials,Java Programming...
# 11

prometheuzz, I don't think you should take that tone with a guy who's developing the world's first self-driving car. I mean, what have you done that justifies that uppity 'tude?

Can't you see that he doesn't have time to "go back to the beginning"? (His self-driving car will take him there automagically once it's done.) He's got hard things to do, like calculating angles. Mere display of JFrames is so yesterday.

%

duffymoa at 2007-7-13 23:52:54 > top of Java-index,Java Essentials,Java Programming...
# 12

> prometheuzz, I don't think you should take that tone

> with a guy who's developing the world's first

> self-driving car. I mean, what have you done that

> justifies that uppity 'tude?

>

> Can't you see that he doesn't have time to "go back

> to the beginning"? (His self-driving car will take

> him there automagically once it's done.) He's got

> hard things to do, like calculating angles. Mere

> display of JFrames is so yesterday.

>

> %

I see your point duffy; a man following in the footsteps of the great D. Hasselhoff should not occupy his/her mind with those petty details.

; )

prometheuzza at 2007-7-13 23:52:54 > top of Java-index,Java Essentials,Java Programming...