How to keep swinging like pendulum?

WeiyuWeiyu Member Posts: 216

Hey guys!
how to let actor keep swinging like pendulum?

«1

Comments

  • ArmellineArmelline Member, PRO Posts: 5,368

    Do you want it to swing constantly, or do you want it to slow down and stop after swinging?

  • WeiyuWeiyu Member Posts: 216
    edited June 2016

    I want it to swing consistently.

  • SocksSocks London, UK.Member Posts: 12,822

    You could use COM + Pin, example attached.

  • BigDaveBigDave Member Posts: 2,239

    @Socks
    man i wish I would know your math
    so heres the noob question how can you use self.time for a result that always should remain the same while self.time always increases?

  • SocksSocks London, UK.Member Posts: 12,822

    @BigDave said:
    @Socks
    man i wish I would know your math

    It's really simple stuff, as you can probably tell by the super complicated rules !

    @BigDave said:
    so heres the noob question how can you use self.time for a result that always should remain the same while self.time always increases?

    I don't understand the question, if you want a value to always remain the same then you can simply set it at that value and leave it, and it will remain the same ?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    @Socks

    It's really simple stuff, as you can probably tell by the super complicated rules !

    Super simple, love the new COM and Pin! :)

  • SocksSocks London, UK.Member Posts: 12,822

    @jamie_c said:
    @Socks

    It's really simple stuff, as you can probably tell by the super complicated rules !

    Super simple, love the new COM and Pin! :)

    Yep, COM and Pin removes the need for three constrains that you'd otherwise need to achieve the same thing.

  • BigDaveBigDave Member Posts: 2,239
    edited July 2016

    @Socks

    thats the thing.
    I dont wanna do something else with it I just wonder why it does what it does.

    100*cos( self.Time *200)

    So the question is that you use self.time.
    Self.time does increase in the moment the actor exists right.
    It always increases.

    So your math works with an ever increasing variable.
    So my question is how does the regularity comes into place based on an ever increasing value.

    It obviously works but I don't get how this works.

    sorry dude I just try to grasp whats going on here I could probably try to learn it via wikipedia but cos and sin are still magical things to me.

  • BigDaveBigDave Member Posts: 2,239
    edited July 2016

    @Socks experimented around with your project I think I get a hang of it thanks to your simple project here.
    Very nice I move a step further to understanding this.

  • SocksSocks London, UK.Member Posts: 12,822

    @BigDave said:
    100*cos( self.Time *200)

    So the question is that you use self.time.
    Self.time does increase in the moment the actor exists right.

    Yes, from the moment the actor appears on the scene its self.time value will increase.

    @BigDave said:
    So your math works with an ever increasing variable.
    So my question is how does the regularity comes into place based on an ever increasing value.

    Think of a clock, look at the second hand, the seconds always increase, yet the second hand displays regularity as it points left - right - left - right - left - right . . . . .

    Cos/sin is doing the same thing, the value in the brackets (self.time*200) is an angle.

    @BigDave said:
    sorry dude I just try to grasp whats going on here I could probably try to learn it via wikipedia but cos and sin are still magical things to me.

    The concept is really simple and straightforward, you don't need to learn any weird maths or algebra, I've attached a project, grab the white dot on the edge of the circle and drag it around, hold the space bar when you drag if you want the angle to lock to neat 5° increments.

    The red line shows you cos, the yellow line shows you sin, that radius of a circle is always 1 (in the world of maths), so cos is simply the distance horizontally from the middle of the circle to where the angle (the white line) meets the edge of the circle - while sin is the distance vertically.

    Hope that makes sense.

  • BigDaveBigDave Member Posts: 2,239
    edited July 2016
  • BigDaveBigDave Member Posts: 2,239
    edited July 2016

    so it basically also works because its a circle and has no end so the self.time ticks through it defining the current angle. Nice

  • IceboxIcebox Member Posts: 1,485

    @Socks In your swing demo , if i dont tick pin it still does the same thing , so what does pin add to it ?

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2016

    @Icebox said:
    @Socks In your swing demo , if i dont tick pin it still does the same thing , so what does pin add to it ?

    Pin allows an actor to rotate but not be moveable.

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2016

    @BigDave said:
    @Socks
    your awesome!
    instant learned difference between cos and sin

    Yeah, they sound all kind of Latin and weird :) but they are pretty simple concepts . . . if you look at the GS project above you can see that cos is simply sin+90° . . . so basically you don't even need to use cos at all (if you don't want to), it's just basically sin but 90° 'out of phase' . . . .

    So if you had something moving in a circular path like this . . .

    constrain X position to 200 x cos (angle)
    constrain Y position to 200 x sin (angle)

    Then you could also say . . .

    constrain X position to 200 x sin (angle+90)
    constrain Y position to 200 x sin (angle)

    . . . or in other words cos is basically the same thing as sin, they are not two different concepts or functions, a little like in maths how multiply is really the same as add, with add you are just adding one value to another, with multiply you are adding lots of values together . . . so 2 x 4 is really just a more convenient way of saying 2 + 2 + 2 + 2 . . . . and cos is just a more convenient way of saying sin+90.

    Hope that makes sense.

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2016

    @BigDave said:
    so it basically also works because its a circle and has no end so the self.time ticks through it defining the current angle. Nice

    Yep, if you keep increasing the angle of an actor (or an object in the real world) it will simply rotate forever, so for example after 1,440 seconds the actor would have rotated to 1,440 degrees (which is 4 whole revolutions) . . . . but obvioulsy using self.time by itself is going to give you really slow rotations as - for example - after 30 seconds the value of self.time will be 30 ! And as we are using self.time for the angle, after 30 seconds we would have only rotated 30°.

    So if 1 second = 1 degree, it would take 6 minutes for a full rotation, so we speed stuff up by multiplying the self.time.

    constrain X position to 200 x cos (self.time)
    constrain Y position to 200 x sin (self.time)

    . . . . boring . . . :#

    constrain X position to 200 x cos (self.time x 100)
    constrain Y position to 200 x sin (self.time x 100)

    . . . . 100 times as fast ! B)

    Basically using self.time is a quick and lazy cheat, it's convenient because it's a value that continuously increases, but you don't have to use self.time, you can put whatever you want into the brackets to use as the angle . . . . for example . . .

    Interpolate AAA from 100 to 250
    constrain X position to 200 x cos (AAA)
    constrain Y position to 200 x sin (AAA)

    In this case the actor will travel in a circular path from 100° to 250°

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @Socks said:
    a little like in maths how multiply is really the same as add, with add you are just adding one value to another, with multiply you are adding lots of values together . . . so 2 x 4 is really just a more convenient way of saying 2 + 2 + 2 + 2 . . . .

    Careful there! Multiplication is a completely different animal than repeated addition. Even if you might end up with the same answer when you multiply whole numbers, addition and multiplication are two completely different operations you can do on numbers. Multiplication '2x4' is definitely not saying '2+2+2+2' -- even if you do end up with the same number!

    But other than that .... carry on.

  • SocksSocks London, UK.Member Posts: 12,822

    @RThurman said:
    Careful there! Multiplication is a completely different animal than repeated addition. Even if you might end up with the same answer when you multiply whole numbers, addition and multiplication are two completely different operations you can do on numbers. Multiplication '2x4' is definitely not saying '2+2+2+2' -- even if you do end up with the same number!

    I've always seen multiplication as simply multiple additions (like you say, when using whole numbers), to me they are the same operation, but I guess these things are open to some degree of interpretation, in the same way that you can see cosine/sine functions as ratios of the sides of a right angled triangle or you can see it as angles on a unit circle (or whatever).

    For me 10x5 is simply adding 5 tens together, but I'm open to other interpretations, either way I was just grabbing at the idea that maths concepts can often be conveniences, in this case once you've got the concept of sin, you don't then have to also learn/understand cos and acos, asin, tan (and so on) as they are basically the same concept . . . in the same way that once you learn your 4 times table there is not a new set of skills or additional logic needed to learn your 5 times table or 10 times table.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @Socks -- yes, I know what you mean. And for whole numbers, the result is the same. But they are still different operations. Honest! Multiplication is not repeated addition. It is not just a different way to interpret the same idea. It is a completely different idea. (Even if the results are the same for whole numbers.)

    But I do get your analogy and that you are trying to explain relationships. Its OK. Carry on!

  • SocksSocks London, UK.Member Posts: 12,822
    edited July 2016

    @RThurman said:
    @Socks -- yes, I know what you mean. And for whole numbers, the result is the same. But they are still different operations. Honest! Multiplication is not repeated addition. It is not just a different way to interpret the same idea. It is a completely different idea. (Even if the results are the same for whole numbers.)

    Without getting all metaphysical (late night, Wales beat Belgium in Euros = hangover :) ) . . . how do they differ to you . . . I'm not questioning your idea, just genuinely interested in how you see them differently (in relation to each other). The multiply-is-just-a-bunch-of-additions (MIJABOA™) concept/interpretation works for me, but I'm not really stretching it beyond positive whole numbers or putting the concept under any real pressure, so I can see its limits (and eventual failure!).

    @RThurman said:
    But I do get your analogy and that you are trying to explain relationships. Its OK. Carry on!

    Yeah, it's an attempt to demystify cos and sin, I suspect people get a bit put off by 'hypotenuse' and 'secant' and 'reciprocal of a cosine' all the other language that gets piled on top of a really really basic concept, I'm sure straightforward counting would be similarly opaque if instead of simply going 1, 2, 3, 4, 5, 6, 7 . . . we started with 1 and then (excuse the made up words) the next number was the"intersine of the root" (or '2'), then we have the 'reciprocal of the chordal modal normative recursive' ('3') and 4 was called the 'quadratic root mode sR1' and then onto the 'base penta-origin' ('5') . . . . :)

    If we counted like that, most people wouldn't be able to count beyond 30, I suspect the same is true of trigonometry, a concept as simple as counting or X/Y co-ordinates but a little buried under maths speak.

  • IceboxIcebox Member Posts: 1,485

    This started as a normal thread and ended up into a math lecture :) lol am i the only one that doesnt understand a word here ?

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @Socks said:
    Without getting all metaphysical (late night, Wales beat Belgium in Euros = hangover :) ) . . . how do they differ to you . . . I'm not questioning your idea, just genuinely interested in how you see them differently (in relation to each other). The multiply-is-just-a-bunch-of-additions (MIJABOA™) concept/interpretation works for me, but I'm not really stretching it beyond positive whole numbers or putting the concept under any real pressure, so I can see its limits (and eventual failure!).

    Hmmm.... addition is sliding your finger along a number line.
    Multiplication is rescaling the number line.
    Exponentiation is growing the number line over time.

    Multiplication only seems like repeated addition. Its is really more like stretching/shrinking than like repetition.

    Multiplication is about ratios. Rather than hyper-addition.

    If you can feel how multiplication is fundamentally different than repeated-addition you will have another mind-bending 'a-hah!' similar to the one that you had for circular math.


    To everyone else -- so sorry for the thread hijack.
    Carry on!

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @Icebox said:
    This started as a normal thread and ended up into a math lecture :) lol am i the only one that doesnt understand a word here ?

    Really sorry about the thread hijack!

  • IceboxIcebox Member Posts: 1,485

    @RThurman I didnt mean it this way sorry i just meant to say how it became harder to understand now :) appologies !

  • SocksSocks London, UK.Member Posts: 12,822

    @RThurman said:
    Hmmm.... addition is sliding your finger along a number line.
    Multiplication is rescaling the number line.

    I'd say these were 'interpretations', for example addition could also be collecting things/values together or even grouping or combining things, you might view measuring distances as sliding your finger along a number line, whereas counting money might be seen as combining values . . . of course at the end of the day, regardless of what mental model you use, the results are the same.

    @RThurman said:
    If you can feel how multiplication is fundamentally different than repeated-addition . . .

    If I'm being honest, I can't ! :) I can't get away from the idea that - for example - 10x5 is simply adding 5 tens together, I can't see any deeper meaning in 'multiply' beyond a form of 'addition'.

    And . . . division is also addition . . . .*

    [/runs for cover]

    (*joking!)

  • BigDaveBigDave Member Posts: 2,239

    @RThurman said:
    @Socks -- yes, I know what you mean. And for whole numbers, the result is the same. But they are still different operations. Honest! Multiplication is not repeated addition. It is not just a different way to interpret the same idea. It is a completely different idea. (Even if the results are the same for whole numbers.)

    But I do get your analogy and that you are trying to explain relationships. Its OK. Carry on!

    I also learned that multiplications like
    3x5

    is basically

    5+5+5

    but of course it doesn't work if you go

    1.1*1.1

    Any ways math was for me extremely hard to get as a kid it was so abstract.
    At most the principle of "guessing" a result.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @Socks said:
    I'd say these were 'interpretations', for example addition could also be collecting things/values together ....

    This might be hard to conceive, but the 'idea' that multiplication is scaling (or rescaling) is not just an interpretation. It is the real fundamental mathematical operation!

    We use these other 'interpretations' to try to get learners to try to understand what multiplication is. And we also use these other 'interpretations' to show how we can easily derive a correct final answer. But the fundamental operation of multiplication is to rescale a number from one um... um... 'size' to another.

    Honest! Multiplication is not repeated addition. That is just repeating an addition.

    Multiplication is rescaling a number to a different value.

    You were taught as a child that multiplication is repeated addition was because a teacher did not understand the basic mathematical operation of multiplication. S/he probably was taught incorrectly as well, and so on ... back through through the ages.

  • SocksSocks London, UK.Member Posts: 12,822

    @RThurman said:
    Honest! Multiplication is not repeated addition. That is just repeating an addition.

    Multiplication is rescaling a number to a different value.

    I think we are going to have to agree to disagree here, it's not that I think anything you've said is wrong (as I say to me these are ways of interpreting or conceptualising an operation), it's just that I've seen nothing to undermine the basic idea that multiplication is a form of addition, at least when it comes to integers, I need more than assertions, it's no good saying 'honest' or that it's hard to conceive' :) I'd ideally need to be shown, perhaps proof of some kind, for me saying "Multiplication is not repeated addition. That is just repeating an addition" is a circular argument or tautology . . . don't get me wrong, I'm happy to be shown why or how they differ at a fundamental level, I'm not invested in the idea in any way [quickly sells his shares in Times_Is_Plus.com :p ].

    @RThurman said:
    You were taught as a child that multiplication is repeated addition was because a teacher did not understand the basic mathematical operation of multiplication.

    Not at all, right or wrong, it's something I've arrived at myself.

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    @BigDave said:
    I also learned that multiplications like
    3x5

    is basically

    5+5+5

    but of course it doesn't work if you go

    1.1*1.1

    Yes -- precisely!

    The way to teach multiplication is to say something like this.

    Teacher: How do you make the number '5' three times bigger?
    Student: What?
    Teacher: If you wanted to make '5' three times bigger than it is now, how would you do that?
    Student: What?
    Teacher: Here is an elastic band that is 5 inches long. If I stretch it three times longer -- how long will it be?
    Student: Well... when I stretch it out it looks like its about 15 inches.
    Teacher: Thats right. In fact it is exactly 15 inches. When we stretch a number out to make it so many times bigger, that is called multiplication.
    Student: OK
    .
    .
    .
    . (Teacher gives more examples of stretching and shrinking "numbers" to drive home the point that multiplication is rescaling.)
    .
    .
    .
    Teacher: So we use a shorthand way of writing multiplication problems. It looks a lot like the way we write an addition problem, but we use another symbol instead of the '+' sign. Instead we use a 'x' sign. We can say that we want 5 to be stretched to 3 times its original value by writing "5x3 =?". (Teacher writes the multiplication problem on the screen.) Now we don't say "Five stretched to three times it's original value." Instead we just say, "Five times three." But that is what we mean when we say, "Five times three".
    Student: (Is it lunch time yet?)

    If taught something like this. You would instinctively know what 1.1 * 1.1 =? means, and would have a deeper understanding of what multiplication really is.

Sign In or Register to comment.