Math Is Fun Forum

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

You are not logged in.

#1 Help Me ! » normal displaced cubic bezier, what type of curve is it? » 2010-08-08 23:29:04

luca-deltodesco
Replies: 0

Given a 2d cubic bezier curve:

define a new curve:

for some constant x, aka the curve resulting from displacing the cubic bezier curve c a constant amount along it's normal.

I've determined that the derivative of the new curve is:

which is correct, and this is how i determined the curve 'd' isn't a cubic bezier, by the fact that attempting to render it as one given start end points and tangents results in a totally different curve from an approximation of d directly.

Is d perhaps a rational bezier curve?

#2 Re: Help Me ! » Need help with factoring. » 2009-10-25 20:31:55

x = -1 can be spotted as a root of the equation quite easily as the coeffecients of the x^2 term and the 5 sum to 1.

(-1)^3 - 4(-1)^2 + 5 = -1 - 4 + 5 = 0

so you have:

(x+1)(x^2 + bx + c)  (coef. of x^2 is 1 since it's multiplied with x to give x^3)
x^3 + (b+1)x^2 + (c+b)x + c = x^3 - 4x^2 + 5

which gives immediately, b+1 = -4 -> b = -5,, c+b = 0 -> c = 5  (or just c = 5 immediately from other coef.)

(x+1)(x^2 - 5x + 5)

#3 Re: This is Cool » Another..nother number trap. » 2009-10-05 11:57:40

I wouldn't have thought so, because one could quite easily define a language where every name for a number, has 1 more letter than the number value, and so you could never reach a finite loop.

#4 Re: Help Me ! » rearranging formulae » 2009-10-01 04:55:27

1.
group like terms together, divide throughout


2.
group like terms together, divide throughout


or to make a nicer looking equation, you can do the following:


3.
move terms to LHS (left hand side) so that the squared term is on it's own, take the square root (remembeing that both -x and x are roots of x^2)


4.
again, make the cubed term be on it's own, take cubed root


(There are strictly 3 cube roots of a number, which the above will allow for, but since you'll not be introduced to complex numbers, the following would suffice)


I'll leave it at that, since I do feel i'm simply doing the work for you here tongue

#5 Re: Help Me ! » How to construct a 10 degrees angle using compass and ruler » 2009-09-29 23:03:03

Well not sure about theorem to describe it, but is it not enough to drawn an equilaterial triangle and dividing one side into 6 using the ruler, and drawn the diagonal making a 10 and 50 degree angle?

make a point, draw a circle, from an edge of the circle, draw another circle with same radius so that it passes through centre of the first circle

at one of the points where the two circles meet, draw lines to the two centres, draw line between centres and that gives you an equilateral triangle, using ruler divide one side into 6 equal segments, and then as above.

#6 Re: Help Me ! » Circle equation question » 2009-09-26 12:40:18

My solution is a complete axis-aligned rectangle, circle intersection method. (It includes corners,edges,containment)

#7 Re: Help Me ! » Circle equation question » 2009-09-25 22:15:31

Your solution is 'still' very convoluted, with so much unnecessary calculations, There is absolutely no need to test the circle against each 4 edges of the rectangle (Not to mention that your code snippet there will not work for vertical lines, nor is it complete, as it is only intersecting against an infinite line, and not the bounded line segment which a rectangle edge is) And even testing against the 4 edges is not enough if you go down this road, because you then also need to handle the case of the circle being completely within the rectangle.

My solution get's around all of this, to give a very fast, very stable solution, which then also opens the door to calculate the minimum displacement needed to seperate the rectangle and the circle so that they no longer intersect, and also the normal of the collision which would be used to resolve the collision and change the velocities of the circle etc appropriately etc.

#8 Re: Help Me ! » Circle equation question » 2009-09-25 03:45:54

because there are two square roots, a positive AND a negative

think: (-a)*(-a) = a*a

so if a^2 = b, then a = +/-sqrt(b)

-------

I would suggest an alternative solution to your problem, one which is both simpler to implement, and with less problems associated with it:

Assuming a circle centred at C, with radius r again, and a rectangle with centre P and half width,half radius w,h

First consider the following

if C.x + r < P.x-w  then the circle cannot intersect the rectangle, the following goes for:
if C.x - r > P.x+w  and equivalent on the y-axis.

This is essentially testing for the intersection of the rectangle, and the bounding square of the circle.

After this, the only test left to consider, is dependant on the voronoi region the circle centre is contained in, to test the circle against the relevant vertex of the square, drawing some simply diagrams you should see that this is true.

So this is my suggestion for your intersection method:

bool intersectCircleAARectangle(vec2 C, float r, vec2 P, float w, float h)
{
    //test bounding square
    float dx, dy, adx, ady;
    dx = adx = C.x-P.x; if(adx<0) adx = -adx;
    dy = ady = C.y-P.y; if(ady<0) ady = -ady;
    if(adx < (r+w) || ady < (r+h)) return false;

    //vertex test
    float px, py;
    if(dx<0) px = P.x-w;
    else       px = P.x+w;
    if(dy<0) py = P.y-h;
    else       py = P.y+h;

    dx = C.x-px;
    dy = C.y-py;
    return (dx*dx+dy*dy)<(r*r);
}

Excuse me if there's any errors, i have just done this from the top of my head.

#9 Re: Help Me ! » Circle equation question » 2009-09-25 01:39:12

Let me guess:

you are attempting to render the circle via the rearrangement:

y = b + sqrt(r^2 - (x-a)^2))

?

in which case, remember that there are two roots, so you need to render both

y = b + sqrt(r^2 - (x-a)^2))

AND

y = b - sqrt(r^2 - (x-a)^2))

There are ofcourse, simpler ways of rendering a circle which will give nicer results, using the polar equation for example with a displacement:

centre of circle C, radius r, by iterating over the full circle for θ render curves through the points

P = C + (r.cosθ i + r.sinθ j)

#11 Re: Help Me ! » discontinuous » 2009-09-13 08:41:40

do you mean:
(x^2-36) / (x+6)

or:
x^2 - 36/x + 6

or:
x^2 - 36/(x+6)

or something else?

without brackets, or any form of formatting it is impossible to know.

#12 Re: Help Me ! » Finding Limits » 2009-09-13 08:40:20

if we're approaching from the right, then we are using the middle condition, that 1 > x <= 3, since as x approaches 1, it will always be greater than 1

and lim(x->1) x+3 = 4

#13 Re: Help Me ! » plz help me in solving equations using a+b+c method » 2009-09-12 00:59:15

if you have a sequence

then the term for n = 1 will be equal to a + b + c


..

the first sequence of differences is:

and the second sequence of differences is:


..

if we start with f_1 and have f_2 and f_3, then n = 1 and we have the following:






...

so for example, the following sequence of 3 numbers, starting from n = 1

2,3,10

the sequence of differences is

1,7

which gives a second difference of 6

so we have:



#14 Re: Help Me ! » solve for y and explain » 2009-09-01 04:33:24

x - 3y = -8

add 3y to each side
x - 3y + 3y = -8 + 3y
x = 3y - 8

add 8 to each side
x + 8 = 3y - 8 + 8
x + 8 = 3y

divide each side by 3
(x+8)/3 = 3y/3

#15 Re: This is Cool » Faster than light speed possible? » 2009-08-25 06:21:03

spin and charge are inherit properties of basic particles, which cannot be changed, only observed. quantum entanglement describes what you are talking about though, if two particles for example are entangled, and you observe one to have a positive spin, then the other particle MUST have a negative spin.

But like i said, information cannot be transferred, because you cannot control what the spin on your particle is when it is observed, all you know is that the other particle must have the opposite.

#16 Re: This is Cool » Faster than light speed possible? » 2009-08-25 04:05:06

bobbym, what you are referring to in your action at a distance is quantum entanglement, which is a perfectly real phenomena, but again, no information can be transferred.

#17 Re: This is Cool » Faster than light speed possible? » 2009-08-24 09:42:46

There are many occurences of things travelling faster than the speed of light; for example the path of a beam of light emitted from a distant fast rotating pulsar.

The difference, is that in none of these occurences of things travelling past c, is any information able to be transmitted.

#20 Re: Help Me ! » Difficulty with Time problem » 2009-07-23 09:54:53

it starts off with hour hand at 180 degrees from 12 oclock , and minute hand at 0 degrees

at time t (in minutes), you have that the hour hand makes the angle

180+t/2 (in one hour (60min) it turns 30degrees)

and the minute hand

t*6   (in one hour (60min) ut turns 360degrees)

so


t*6 - (180+t/2) = 180

5.5t - 180 = 180
5.5t = 360
t = 65.454545454545... = 1hr 5min 27sec 273ms    and so on, to nearest second we have that the next time will be

07:05:27

#21 This is Cool » Another..nother number trap. » 2009-07-19 10:33:06

luca-deltodesco
Replies: 7

This is one i've known for many years.

Start with any number (or infact, word i might say)

At each step, take the number that represents the number of letters in the word, and use that as your next word
you inevitably end up at four, which ofcourse is the end of the line, since the word 'four' has 4 letters.

Timbuktu -> 8
Eight -> 5
Five -> 4
Four -> 4

Equivalent version in Italian, you inevitably end up with 'tre' (3)

Timbuktu -> 8
Otto -> 4
Quatro -> 6
Sei -> 3
Tre -> 3

#23 Re: Help Me ! » c constant with applications of differential equations » 2009-07-17 20:46:48

the two equations are exactly the same in the end; both C and K are both constants, so the product CK is also a constant.

thus e^k(t-c) is essentialy exactly the same as e^(tk-c), only that c has a different value because it is not multiplied by k

You could say that your teachers solution is simplified.

--

In the same way, you might end up with an integration where when you manipulate it you end with a constant like:

I(x) = f(x) + 4.5C

which ofcourse, you can equally just write as

I(x) + f(x) + C'

the C is written with the apostrophe here just to explicitly show that it is not the same constant as the first equation, but both are correct

#25 Re: Help Me ! » Speed and distance » 2009-07-01 22:32:10

moving at 10km/h, after 30 minutes Peter will have travelled 10*0.5 = 5km  (since 30minutes = 0.5hours)

at time t (hours), the sister will have moved 12t, whilst peter moves 10t, but peter is also 5km ahead of his sister

so you have the equation

12t = 5 + 10t
2t = 5
t = 2.5hrs

Board footer

Powered by FluxBB