• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[General] Does Circle Intersect Steiner Circumellipse in wc3

Status
Not open for further replies.
So... can anyone help me with this?

If I have a point (x,y) and 4 polar offsets: 1 in front, 1 in back, and 2 to the sides, and then create 2 triangles from them (front, side, side) (back, side, side), and from those create 2 steiner circumellipses, how would I go about calculating the focii of the circumellipses (within int32 limits) so that I could check to see if the ellipses intersected a circle? Furthermore, how would I retrieve how much it intersects a circle (total area of intersection).

I imagine that I could take the integral between the circle and the ellipse (where they intersect) ;p, but anyways.

Thanks for your help if you can help me with this : (. I've really been wanting to make a custom combat system, and this is the way to do it >: ).
 
You lost me at "So.." :p
JK

I'm trying to find it for you..
Don't go anywhere, I have all the formulas, I just have to simplify them :p
Actually I don't know where to go from there :p

OK...
I researched about it, but I didn't get anything because they were explaining it in a way
so that you'd only understand it if you already knew it :p

Sorry I couldn't help :(
 
Last edited:
Yea, I know how to do the integral stuff, just need help with the steiner circumellipse.

The equations output really really huge numbers and I think that they take side lengths, not vertexes (it doesn't say which, but I know when I tried vertexes, it didn't work).

I guess I could do it in BigInt, but that would kill the map.


So, anyone pro with geometry conics? : D
 
I just read about them yesterday.
A combat system that uses steiner circumellipses would be EPIC!

Just some info for anyone who doesn't know, the steiner circumellipse is an ellipse
that has a center which happens to be the centroid of a triangle who's points lie on the
circumference of the steiner circumellipse.

Here's a pic:

steiner_es.gif
 
It's actually 1 blob (each quadrant is a different ellipse), so really 4 ellipses (said 2 just to make it seem simpler). These 4 ellipses define an attack path (arc of a weapon or w/e). The reason for 4 ellipses is is so that any attack path can be done (w/e a person wants). The center is the origin.

The problem is that I don't start with the equations with the ellipses, just 4 vertexes (a really skewed up rectangle). These represent max left, max right, max up, and max down. For example, for a sword, the max front, left, and right might be 6, but the back might be 1.

A steiner circum ellipse is the smallest ellipse that can be formed over a triangle. If one were to split the rectangle into 4 triangles (1 for each quadrant) and then find the steiner circum ellipse for each quadrant, one could then determine the curve of the attack path. Of course, you could just use 4 triangles and that'd be pretty good, but it wouldn't be as good as 4 ellipses.

The only thing I need to find are the 8 foci of the 4 ellipses and then I'll be set.
 
Focal length isn't needed, specific coords are needed : p. Couldn't figure out rotation when working with the focal length (couldn't isolate the angle anywhere).

also at gandalf, I already know about those equations but Z doesn't fit into int32.

small 128 num within Z:
268435456

max:
2147483647

It could easily go to 2^32, which would be 1 above the unsigned int32 max.
 
Let's blame it on Blizzard ;)

GetUnitFacing(u) - 90.00 (Maybe that could help)

By taking a unit's position, you could find the polar projection of that location with an offset of the focal length on an angle equal to his facing angle - 90 degrees (Unless you're doing it with Radians ;D)

The coordinates shouldn't be a problem (GetLocationX, GetLocationY)

I'm not sure if I'm talking giberish or something :p mostly cuz I just learned what a
steiner circumellipse is (yesterday), so correct me if I'm wrong.
 
Here is the concept... notice 4 different ellipses and only 1 half of each one is used. Also see the four different triangles formed by the center and the four polar offsets I described (can be rotated any which way). The center dot would be like the unit. The four colored regions would be the areas that the ellipse works in (so half the ellipse + the triangle).

The circle I'm checking for intersection would be the unit. For example, if half the circle intersected with the region I talked about, then it'd take more damage. If only a small tiny portion (like a nick) intersected with it, then it'd take way less damage. If the entire circle intersected with it, the unit would be chopped in half ;D.

Using the facing of target unit as well as the rotation (from quadrant to quadrant) of the attack, it can be determined just where the unit should block in order to avoid as much damage as possible or stop the attack altogether.
 

Attachments

  • Concept.jpg
    Concept.jpg
    10.3 KB · Views: 84
I read the texts and tried to calculate these alphas, betas and gammas but where to I have to put them?
I thought they might be the distance from the center of the sides a, b and c to the points but it does not work that way
could you have a look at it?

(also what is this equation for Z for? I also tried that and got huge numbers too but the alpha, beta and gamma values are weird)
 

Attachments

  • Steiner Circumellipse.w3x
    15.7 KB · Views: 64
That map was EPIC!!!
Who knew math could be so awesome ;)

The trilinear coordinates are points of intersection between
3 lines emerging from the centroid of a triangle to the sides...
for anyone who cares :p

I tried finding a solution, but all I came up with is:

2(Area triangle) / ((s1*alpha)+(s2*beta)+(s3*gamma)) = 1

Where: s1=>side1; s2=>side2; s3=>side3; etc..
 
Last edited:
Status
Not open for further replies.
Top