generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: So I need some help with 3D geometry.

Previous Thread :: Next Thread 
yoyoman2 is not online. yoyoman2
Joined: 07 Mar 2009
Total Posts: 2170
03 Nov 2013 12:54 AM
I am currently making a wind simulator, and need some help with geometry in 3D.
I did not learn this stuff in school, because Its suppose to be first year in university or something.

anyways, I have 4 Lines that are parallel to each other and are the same length, I make planes on all 8 points of the lines.

How do I find out that a certain point in space is inside that object.

If it will be easier for you guys, I can make it a 3D rectangel.

I you will not help me make it, which is totally ok for me, can you just direct me to some source so I can learn this stuff?
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
03 Nov 2013 12:55 AM
"4 lines" "the same length" kk
Report Abuse
yoyoman2 is not online. yoyoman2
Joined: 07 Mar 2009
Total Posts: 2170
03 Nov 2013 12:57 AM
yes, If you are un aware that a line can be described as all the points between two dots.

It can also be described as a dot and a direction, but that would make it infinite, would it not?
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
03 Nov 2013 01:01 AM
In Geometry, all lines are infinite. We call a line between 2 dots as a line segment. Anyways, to find out if a point is in the rectangle, well...

if (rect.x0 < dot.x and dot.x < rect.x1 and rect.y0 < dot.y and dot.y < rect.y1) then
print("Is in the box");
end
Report Abuse
yoyoman2 is not online. yoyoman2
Joined: 07 Mar 2009
Total Posts: 2170
03 Nov 2013 01:02 AM
this is where my problem comes.

I never said that my rectangle was not rotated.
Report Abuse
XAXA is not online. XAXA
Joined: 10 Aug 2008
Total Posts: 6315
03 Nov 2013 01:13 AM
Cast a ray from the point towards the center of the rectangle. If it intersects only one line, then it's inside the rectangle.
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
03 Nov 2013 01:20 AM
Xaxa, I was about to say that too.
Report Abuse
SCP087Project is not online. SCP087Project
Joined: 29 Sep 2013
Total Posts: 198
03 Nov 2013 05:25 AM
You could use Vector3's :IsClose() method.
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
03 Nov 2013 06:52 AM
SCP, he wants the algorithm itself... I think?
Report Abuse
TheColorMan is not online. TheColorMan
Joined: 30 Jan 2010
Total Posts: 11228
03 Nov 2013 08:27 AM
@AndroidKitKat

Stop trying to sound smart you knew what he meant -.-
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
03 Nov 2013 04:20 PM
...What did I do wrong?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image