Math Is Fun Forum
  Discussion about math, puzzles, games and fun.   Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ -¹ ² ³ °

You are not logged in.

#1 2005-09-12 13:14:23

sonyafterdark
Member
Registered: 2005-09-12
Posts: 28

The cool maths that games can teach you!

I'm going to present you with 2 simple geometry problems. I've already bumped into them and have found solutions on my own, though doubtless there is (was) someone out there who's solved these before me.

Here goes.

1. How can you tell if a geometrical body is closed or open (is there any way to get inside it without going through a face)? Only a real test will do. No intuitive answers such as "You see if there's a facet missing or not" is acceptable. A valid algorhitm is required.

Nothing is obvious in the computer world, remember this. Water might be dry for all a computer knows...

2. Given N planar line segments (line segments inside a plane) that may intersect THEMSELVES in ANY WAY, what is the MAXIMUM NUMBER of segments that may be projected upon some arbitrary line (inside the same plane)? All of the N segments stay on the same side of the line that projection occurs on.

The challenge has been set. Who shall rise to meet it? If there's no correct answer to any one of the 2 questions within a reasonable period of time I shall intervene to enlighten.

Do contact if clarifications are needed.

Cheers!


An intelligent man usually knows how to reach his goals. A wise man also knows what goals to reach...

Offline

#2 2005-09-13 09:05:08

kylekatarn
Member
Registered: 2005-07-24
Posts: 445

Re: The cool maths that games can teach you!

I didn't undestood what you want in the second problem

Offline

#3 2005-09-13 09:25:28

MathsIsFun
Administrator
Registered: 2005-01-21
Posts: 7,550

Re: The cool maths that games can teach you!

First, thank you for the cool puzzles.

Second, what wierd timing ... I have been working on modelling solids the last week!


"The physicists defer only to mathematicians, and the mathematicians defer only to God ..."  - Leon M. Lederman

Offline

#4 2005-09-13 17:54:02

ryos
Member
Registered: 2005-08-04
Posts: 394

Re: The cool maths that games can teach you!

No intuitive answers? But all answers are intuitive!

I also don't know what #2 is asking.

These answers aren't rigorous proofs by any means, just intuitive thoughts based on the definitions of things.


El que pega primero pega dos veces.

Offline

#5 2005-09-14 03:33:01

kylekatarn
Member
Registered: 2005-07-24
Posts: 445

Re: The cool maths that games can teach you!

A "geometrical body" can have a point connected to only another point and still be a closed figure

Imagine a cube.  6 vertices.[V1...V6]. Closed figure .

Now imagine a point outside the cube P1. Connect P1 with V1.

We new have a closed "geometrical body" with 7 vtxs, one of them only connected to 1 other.

P1 --- V1 ---
          | \
          |   \


There are other situations where this can ocur

Last edited by kylekatarn (2005-09-14 03:47:02)

Offline

#6 2005-09-16 23:53:27

sonyafterdark
Member
Registered: 2005-09-12
Posts: 28

Re: The cool maths that games can teach you!

Sorry, I didn't mention we were talking about a volumetric body. But no. The answer is quite simple actually.

1. If there is at least one edge that is not common to at least 2 faces (facets) of the body, then it is open. Otherwise it is closed. (Note: if there's one edge of this type there's bound to be at least another 2 wink)

2. The MAXIMUM NUMBER of segments that may be projected upon some arbitrary line is (S-1)*4, where S is the number of segments that may intersect themselves in any way possible and are projected into the segments on the arbitrary line.

Thanx for posting. Hope this is clear enough.

Oh, and Wink, how about a joint 3D engine project. You good at coding?

Last edited by sonyafterdark (2005-09-17 00:01:24)


An intelligent man usually knows how to reach his goals. A wise man also knows what goals to reach...

Offline

#7 2005-09-17 00:33:55

kylekatarn
Member
Registered: 2005-07-24
Posts: 445

Re: The cool maths that games can teach you!

Thanks Sony!
wow now I see.. the 1st one was pretty obvious!

Last edited by kylekatarn (2005-09-17 00:34:08)

Offline

#8 2005-09-17 12:30:02

Zach
Member
Registered: 2005-03-23
Posts: 2,075

Re: The cool maths that games can teach you!

Sony, that's MathsIsFun, not winked. That's just his user award thing-a-mob. big_smile


Boy let me tell you what:
I bet you didn't know it, but I'm a fiddle player too.
And if you'd care to take a dare, I'll make a bet with you.

Offline

#9 2005-09-17 14:09:57

ryos
Member
Registered: 2005-08-04
Posts: 394

Re: The cool maths that games can teach you!

Hey sony, what happens if you have a sphere? There's technically no facets...


El que pega primero pega dos veces.

Offline

#10 2005-09-17 15:32:55

sonyafterdark
Member
Registered: 2005-09-12
Posts: 28

Re: The cool maths that games can teach you!

Come on Ryos, you just scramled for something to shut me up with wink.

Remember, we're talking about a computer implementation algo.

How would you even define (store) an open sphere except by triangulating it or using an infinite amount of data if the aperture (opening) is irregular? Tough one, isn't it?

And even if you could, somehow - other than triangulating -, store your open sphere, wouldn't it make the entire exercise futile seeing as how a normal (closed) sphere is defined so much simpler: a vertex (centre position) and a radius?

But the short, simple answer is, as you might expect, "I don't know". big_smile
But I've never thougt of it from this angle... what a difference it makes to be outside the box, no? smile

2nd. point:

Adminy, will you take me up on my offer to coproduce a 3D engine? you good at coding?

Oh, and here's a 3D treat ;D :

Applying fish eye lens projection effect :

                     VertexX
ProjectedX=--------------------------------------
                  √(VertexX²+VertexY²+VertexZ²)

and, analogue,

                     VertexY
ProjectedY=--------------------------------------
                  √(VertexX²+VertexY²+VertexZ²)

Next time I'll paste an description of curved interpolation. Stay tuned!!!

Enjoy. I'll be launching a HomeSite (eventually - I'm such a sloth big_smile). I'll be sure to paste a link here!

Cheers!

Last edited by sonyafterdark (2005-09-17 15:35:39)


An intelligent man usually knows how to reach his goals. A wise man also knows what goals to reach...

Offline

#11 2005-09-17 16:28:25

kylekatarn
Member
Registered: 2005-07-24
Posts: 445

Re: The cool maths that games can teach you!

that's...nice.

Last edited by kylekatarn (2005-09-17 16:29:06)

Offline

Board footer

Powered by FluxBB