Register  |  Home  |  Chat   |  ArmaBrowser  |  HowTo  |  Wiki  |  ServerStats  |  Donate  |  Forum  |  MapTools  |  Servers  |  Log in 
Forums
Information Desk
Latest News
Round Table
Servers
Trainees
Challenge us!
Off Topic

Clan Information
Public Clan Information
Active CTers+Trainees
All CTers+Trainees
Inactive CTers
CTers Earth Map
CT Groups
CT Medals
Armahacktron Wiki
Forum Ranks
Won/Lost Battles

Servers and Maps
ArmaBrowser
BFC New Ladder
CT Server Ladders
CT Mayhem Ladder
CTWF New Ladder
CT Server Maps
Flower Power Sumo Assault
Map Tools
Want to help? Donate

Jumble
HomeForum
CalendarChatMessengerIRC
Forum Members
LinksFAQ
NewsView Online

Search

Advanced Search

User Block
Username:

Password:

 Remember me



I forgot my password

Don't have an account yet?
You can register for FREE


Reply to topic
 Map making help(intersection points) 
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: 10
Field's place: def-sweep
Grid Name: ct¤kyle
GID: kyle@ct/jedi
CT Wild Fort Rank: na
Joined: 31 Mar 2006
Posts: 4JU365898 Posts
Location: United States
Reply with quote
i made this simple C++ program to rind the intersection points of line it should work good for hex maps

i may modify it farther to do more thinks


Code:
//intecept finder


#include <fstream.h>
#include <iostream.h>
#include <iomanip.h>
#include <math.h>

int main()
{
/*----Variables----*/
double x,x1,x2,x3,x4,y,y1,y2,y3,y4,b1,b2,m1,m2;
/*----Data entry----*/
cout<<"Line 1, Point 1 X: ";
cin>>x1;
cout<<"Line 1, Point 1 Y: ";
cin>>y1;
cout<<"\nLine 1, Point 2 X: ";
cin>>x2;
cout<<"Line 1, Point 2 Y: ";
cin>>y2;
cout<<"\nLine 2, Point 1 X: ";
cin>>x3;
cout<<"Line 2, Point 1 Y: ";
cin>>y3;
cout<<"\nLine 2, Point 2 X: ";
cin>>x4;
cout<<"Line 2, Point 2 Y: ";
cin>>y4;
/*----calculations----*/
m1=((y1-y2)/(x1-x2));
m2=((y3-y4)/(x3-x4));

b1=((-1*(m1*x1))+y1);
b2=((-1*(m2*x3))+y3);
x=pow (((m1-m2)/(b1+b2)),-1);
y=m1*x+b1;

/*----Print to text file----*/
ofstream code ( "code.txt" );
code<<"<Point x=\""<<x<<"\" y=\""<<y<<"\"/>\n";

code.close();
/*----Print output----*/
cout<<"\n("<<x<<","<<y<<")\nThis code has been printed to code.txt";


 return(0);
 
 }



Last edited by kyle on Tue Dec 04, 2007 3:07 am; edited 2 times in total

_________________

In theory it should work in reality who knows if it will work.

MB53: I am 26 years old how can i be a teen ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Ex-CTer
Map Maker (Amount: 1)
CT Rank: Not a CTer
Field's place:
Grid Name: syllabear
GID: syllabear@ct/public
CT Wild Fort Rank: na
Joined: 14 May 2006
Posts: 16F361527 Posts
Location: UK
Reply with quote
huh? why not use the circle program? or do the math (simple simple)

ur last name is slane? (lol rofl Rofl)
View user's profile Find all posts by syllabear Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
  
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: 10
Field's place: def-sweep
Grid Name: ct¤kyle
GID: kyle@ct/jedi
CT Wild Fort Rank: na
Joined: 31 Mar 2006
Posts: 4JU365898 Posts
Location: United States
Reply with quote
just easyer to use a program
it eaven whites it into the xml

Code:
<Point x="x" y="y"/>

_________________

In theory it should work in reality who knows if it will work.

MB53: I am 26 years old how can i be a teen ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Jedi
Crazy Tronner
Server Tech
Honorary Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: Not Ranked
Field's place: sweeper
Grid Name: ct-eddie
GID: ed@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 1X9362493 Posts
Location: Wales, UK
Reply with quote
so how do you use it?
C++ is completely alien to me.
View user's profile Find all posts by ed Send private message
  
Crazy Tronner
Honorary Member
Donator (Amount: 1)
CT Rank: Not Ranked
Field's place: support
Grid Name: CT×X3V1
GID: xevic@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 26B362819 Posts
Location: Barcelona
Reply with quote
compile and build it and then just execute it Razz (gcc -o)

_________________
Visca el Barça! CUIG (See you in game) and don't forget to sing with us: lalalalala Sing
View user's profile Find all posts by xevic Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
  
Jedi
Crazy Tronner
Server Tech
Honorary Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: Not Ranked
Field's place: sweeper
Grid Name: ct-eddie
GID: ed@ct/jedi
CT Wild Fort Rank: na
Joined: 22 Mar 2006
Posts: 1X9362493 Posts
Location: Wales, UK
Reply with quote
Thanks Xevi, that helps a lot Sad
View user's profile Find all posts by ed Send private message
  
Will rot in Hell
CT Rank: Not a CTer
Field's place:
Grid Name: Luzifer
GID: Luzifer@ct/public
CT Wild Fort Rank: na
Joined: 12 Jun 2006
Posts: 3P36133 Posts
Location: Hell
Reply with quote
As far as I know, you need a compiler, like gcc wich is freeware: http://gcc.gnu.org
This compiles the C++ Program into an .exe file so you can use it.
View user's profile Find all posts by Luzifer Send private message ICQ Number
  
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: 10
Field's place: def-sweep
Grid Name: ct¤kyle
GID: kyle@ct/jedi
CT Wild Fort Rank: na
Joined: 31 Mar 2006
Posts: 4JU365898 Posts
Location: United States
Reply with quote
yes like everyone saying just compile it with a C++ compiler

save it as ????.cpp

if i find a place i'll post the exe for it

my goail it to learn java this year and make map maker program

_________________

In theory it should work in reality who knows if it will work.

MB53: I am 26 years old how can i be a teen ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Ex-CTer
CT Rank: Not a CTer
Field's place:
Grid Name:
GID: Not working
CT Wild Fort Rank:
Joined: 27 Jul 2006
Posts: 7S36280 Posts
Location: Bakersfield, Ca
Reply with quote
Just for your information, when making my Pentagram map, this little calculation utility would have saved me a couple hours of work, at least. I did all my line intersect calculations with pen and paper and screwed up on a couple of them by accidentally missing a digit in the hundreds place on one. Line intersection is important for making accurate maps that allow grinding walls that are separated by open space (like my pentagram map, for example).

Now onto another important matter... Kyle's spelling problem... lol

  • rind = find
  • farther = further
  • easyer = easier
  • eaven = even
  • whites = writes
  • goail = goal

Embarassed

[18:13] [Arm] Kyle: mine i cam go as procise i want to code it just do not know how procise to make it
[18:14] * [Arm] Kyle can not spell/type tonight

Rofl

One more thing... Are you going to change your handle on CT to G33K?

_________________
'Deen Foxx (Wargasm)
View user's profile Find all posts by wargasm Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
  
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: 10
Field's place: def-sweep
Grid Name: ct¤kyle
GID: kyle@ct/jedi
CT Wild Fort Rank: na
Joined: 31 Mar 2006
Posts: 4JU365898 Posts
Location: United States
Reply with quote
So i can't spell a lot of the time when i post here i use word to dubble check eveything. but lately i have been to lazzy to do this


i'm keeping my name on the forums as kyle

but for the game i'll most likely be using g33k fo a while

_________________

In theory it should work in reality who knows if it will work.

MB53: I am 26 years old how can i be a teen ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: 10
Field's place: def-sweep
Grid Name: ct¤kyle
GID: kyle@ct/jedi
CT Wild Fort Rank: na
Joined: 31 Mar 2006
Posts: 4JU365898 Posts
Location: United States
Reply with quote
wargasm wrote:
[18:13] [Arm] Kyle: mine i cam go as procise i want to code it just do not know how procise to make it
[18:14] * [Arm] Kyle can not spell/type tonight

at least give me consistency



finaly found 1 more way to spam, time to post my 500

_________________

In theory it should work in reality who knows if it will work.

MB53: I am 26 years old how can i be a teen ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Ex-CTer
Map Maker (Amount: 1)
CT Rank: Not a CTer
Field's place:
Grid Name: syllabear
GID: syllabear@ct/public
CT Wild Fort Rank: na
Joined: 14 May 2006
Posts: 16F361527 Posts
Location: UK
Reply with quote
this is so mesed up C++ is so dam complicated!!!???!!! .exe?

cannot understand u its like learning french all over again - why cant they have something simple every one can understand!

so u want to make circle maps? use the circle builder tool that ed showed me. forgot the website though

and i thought i was good with computers
View user's profile Find all posts by syllabear Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
  
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: 10
Field's place: def-sweep
Grid Name: ct¤kyle
GID: kyle@ct/jedi
CT Wild Fort Rank: na
Joined: 31 Mar 2006
Posts: 4JU365898 Posts
Location: United States
Reply with quote
this is for intersection

by the way its not that hard to learn it only uses stuff fron the first 2 chaptes of the book maybe the 3rd

_________________

In theory it should work in reality who knows if it will work.

MB53: I am 26 years old how can i be a teen ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: 10
Field's place: def-sweep
Grid Name: ct¤kyle
GID: kyle@ct/jedi
CT Wild Fort Rank: na
Joined: 31 Mar 2006
Posts: 4JU365898 Posts
Location: United States
Reply with quote
And for those of you who like JAVA

here is the code
name it Intersection.java
you can run it with eclipse
Code:
import java.util.Scanner;
import java.lang.String;
public class Intersection {
   public static void main(String[] args) {
      Scanner in = new Scanner(System.in);
      System.out.println("Enter Line 1 point 1(x,y): ");
      String a = in.next().replace(',',' ');
      Scanner s = new Scanner(a);
      double x1 =s.nextDouble();
      double y1 = s.nextDouble();
      System.out.println("Enter Line 1 point 2(x,y): ");
      a = in.next().replace(',',' ');
      s = new Scanner(a);
      double x2 =s.nextDouble();
      double y2 = s.nextDouble();
      System.out.println("Enter Line 2 point 1(x,y): ");
      a = in.next().replace(',',' ');
      s = new Scanner(a);
      double x3 =s.nextDouble();
      double y3 = s.nextDouble();
      System.out.println("Enter Line 2 point 2(x,y): ");
      a = in.next().replace(',',' ');
      s = new Scanner(a);
      double x4 =s.nextDouble();
      double y4 = s.nextDouble();
      double  m1 =((y1-y2)/(x1-x2));
      double  m2 =((y3-y4)/(x3-x4));
      double b1=((-1*(m1*x1))+y1);
      double b2=((-1*(m2*x3))+y3);
      double x= 1/(((m1-m2)/(b1+b2)));
      double y=m1*x+b1;

      System.out.println("X = "+ x+"\nY = "+y);
   }

}

_________________

In theory it should work in reality who knows if it will work.

MB53: I am 26 years old how can i be a teen ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
  
Jedi
Crazy Tronner
Clan Admin
Senior Member
Ladle, 1x (Amount: 1) Map Maker (Amount: 1)
CT Rank: 10
Field's place: def-sweep
Grid Name: ct¤kyle
GID: kyle@ct/jedi
CT Wild Fort Rank: na
Joined: 31 Mar 2006
Posts: 4JU365898 Posts
Location: United States
Reply with quote
i dono why i posted the previous code i just made it into an applet that you can see here
http://wiki.crazy-tronners.com/Intersection.html

EDIT: There are a few error when you use Horizontal and Vertical lines
Also if you are unable to copy the code try getting the latest JAVA
If the latest JAVA does not work than please post here and I'll change
it to a text field

EDIT EDIT: All problems are fixed as far as i know, However If you find one let me know.

_________________

In theory it should work in reality who knows if it will work.

MB53: I am 26 years old how can i be a teen ? Very Happy
owned: You got the heart of a teen Smile
Gonzap: and the innocence of a little child
View user's profile Find all posts by kyle Send private message AIM Address Yahoo Messenger MSN Messenger
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic  Post a reply  

free counters