Register
Email: Password:
Forum » Maths conversation
  • « previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • » next
  • Maths conversation

    MageKing17 16 years ago
    Not off of the top of my head.

    If you need to calculate the number of seconds that have passed between two date/time pairs (assuming no wierdness like leap seconds), I'm totally there, however. I just spent over an hour making it work on my TI-92+.
    #
    E_net4 16 years ago
    I bump this topic because the previous problem wasn't solved yet.
    #
    Amarth 16 years ago
    The one of the triangle? I'm not quite sure what you need, but I can think of something on top of my head... I doubt it'll be useful for computer graphics though.

    Let the triangle be given by the points A,B and C. Let D(t) = t*B + (t-1)*C for 0 <= t <= 1. Then is E(s,t) = s*A + (s-1)*D(t) for 0 <= s <= 1 a parametrization of the triangle. I think.

    Motivation: D(t) is a parametrization of the line segment BC. For each t between 0 and 1, you have a point on the edge. Also, E(s,t) is a parametrization of the line segment from A to D(t) for each t. The triangle is the union of those line segments for s between 0 and 1.
    #
    E_net4 16 years ago
    I thought at first that I could use equations to determine what area to draw for the triangle. If you have another idea, please do tell me.
    #
    Amarth 16 years ago
    Use a decent library. Like, you know. OpenGL or something. That thing basically perfected the art of drawing triangles.

    Apart from that, really, this is hard stuff. You might want to start thinking about how you'd draw a line between two points if there was no function for that (a solution). Now do that again, but with lines stacked on each other to create the triangle. Alternatively, use 3 lines and then use flood fill.

    Mind you, this is going to be mind boggling, eye aching, ear bleedingly slow, buggy, and annoying. Your call.
    #
    E_net4 16 years ago
    I find that Algorithm to be the thing I need. I intended to do this without a library at all (I know it's not recommended).
    Anyways, I just hope I end this once and for all. Meanwhile, you can gaze upon my sequence.
    #
    E_net4 16 years ago
    Meet my new mathematical problem!

    So I have a point's position (X px,Y px). I need a funtion to return (X,Y). Some extra information is provided on the bottom.

    FYI "tg" = "tan"
    #
    Grim Reaper 16 years ago
    So basically wish to know which tile the point is on?
    #
    E_net4 16 years ago
    "Grim Reaper" said:
    So basically wish to know which tile the point is on?
    Yes. Any clue?
    #
    Idiota 16 years ago
    It's vacation, which means that my brains are running in sleep-mode. Ask Amarth. :p
    #
    Amarth 16 years ago
    I'm sorry. I'd solve it by multiplying a scaling and rotation matrix and adding a translation vector to it, but I guess that's not the answer you're looking for. Pity, really, cause linear algebra is useful for defining affine transformations.

    I might work out the formulas if I can find some time. You can ask Anarion how much time I have, though.
    #
    MageKing17 16 years ago
    It would help if you supplied the dimensions of the diamonds. I don't fancy guessing based on the scale of that apparently-slightly-inaccurate diagram.
    #
    E_net4 16 years ago
    You mean the dimensions in pixels? If so, the height would be 32px. You can calculate the width with this value.
    #
    Amarth 16 years ago
    Urghl. I worked on this for an hour yesterday trying to get the formulas and it didn't work out. And I know see why: against my assumptions, it's a non-isometric transformation due to that 120° angle.

    I've never really worked with shear transformations, I hope I can make it work. Lemme see...
    #
    MageKing17 16 years ago
    Is it just me, or is the bottom part of the diagram wrong?

    If the tangent of 60 degrees was X / 1, why is 1 the vertical line (I.O.W., the Opposite)? Shouldn't it be 1 / X?
    #
    Amarth 16 years ago
    It's just you. 60° is the angle between the green line and the left side of the diamond, thus the opposite is X. The green and blue lines are angle bisectors.
    #
    MageKing17 16 years ago
    Nevermind, though you're right. I answered my own question, if I'd just bothered to pay attention.
    #
    E_net4 16 years ago
    Heh, at least it's nice that you're trying to help me.

    Well there has to be a way. Simcity* can do it, then why not my programs?

    *Simcity 2000 or 3000
    #
    Nuklearni-okurka 16 years ago
    1 + 1 = ?
    #
    MageKing17 16 years ago
    "Nuklearni-okurka" said:
    1 + 1 = ?
    Why, 11 of course.
    #
    Grim Reaper 16 years ago
    "MageKing17" said:
    "Nuklearni-okurka" said:
    1 + 1 = ?
    Why, 11 of course.
    It's also 10.
    #
    E_net4 16 years ago
    "Grim Reaper" said:
    "MageKing17" said:
    "Nuklearni-okurka" said:
    1 + 1 = ?
    Why, 11 of course.
    It's also 10.
    Could also be b.
    #
    Grim Reaper 16 years ago
    "E_net4" said:
    "Grim Reaper" said:
    "MageKing17" said:
    Why, 11 of course.
    It's also 10.
    Could also be b.
    Not to mention 42.
    #
    E_net4 16 years ago
    "Grim Reaper" said:
    "E_net4" said:
    "Grim Reaper" said:
    It's also 10.
    Could also be b.
    Not to mention 42.
    For the lulz.
    #
    MageKing17 16 years ago
    It's also 98... or 62.
    #
    Grim Reaper 16 years ago
    "MageKing17" said:
    It's also 98... or 62.
    Could be 23 as well.
    #
    E_net4 16 years ago
    Huh... Did anyone mention 2?
    #
    Grim Reaper 16 years ago
    "E_net4" said:
    Huh... Did anyone mention 2?
    MageKing mentioned it in Unary, and I mentioned it in Binary.
    #
    MageKing17 16 years ago
    "Grim Reaper" said:
    Could be 23 as well.
    I'm afraid I don't get that one.
    #
    Grim Reaper 16 years ago
    "MageKing17" said:
    "Grim Reaper" said:
    Could be 23 as well.
    I'm afraid I don't get that one.
    If you define "1" to be a function that returns 11.5, you get 11.5 + 11.5, which equals 23.
    #
    Amarth 16 years ago
    Also in the fields F3 and F7 and the commutative ring Z/(21Z), you have that 1+1 = 23.
    #
    Narvius 16 years ago
    Uh...
    I've got a question.
    Is that true:

    {


    for [0 <= n <= 9]
    [0,(n) * 9 = n]

    Because...
    [0,(n) * 10 - 0,(n) = n,(n) - 0,(n) = n]
    But I'm not sure if that's true:
    [0,(5) * 10 - 0,(5) = 5,(5) - 0,(5) = 5]

    The same for numbers above 9 - but it must be multiplied by that much 9's as it has digits, for example:
    [0,(12345) * 99999 = 12345,(12345) - 0,(12345) = 12345]

    }?

    Also...
    [n / 9 = 0,(n)]
    So [0,(9) = 1], right?

    (I'm a droid, yay!)
    #
    E_net4 16 years ago
    You know, I'd poke someone else for this one. I wouldn't mess with finite decimal representations, although that appears to be fine.
    #
    MageKing17 16 years ago
    I'm unfamiliar with the notation. Does it represent infinitely repeating decimals?
    #
    Narvius 16 years ago
    Yes.
    #
    Forum » Maths conversation
  • « previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • » next
  • Post Reply


    Your email:
    Your name: