Results 1 to 3 of 3

Math Help - Converting time into a repeating sequence.

  1. #1
    Newbie Scifinity's Avatar
    Joined
    Feb 2010
    From
    West Sussex
    Posts
    2

    Converting time into a repeating sequence.

    Hi Guys,

    The problem up front:

    How to convert a steadily increasing number into a resetting, repeating sequence.

    Background:

    I am creating an animation in Vue 7. I have a grayscale image map in which black = -1 and white = 1. It can be attched to any output node to produce varying color, transparency etc.

    It is possible to connect various nodes that have mathematical functions to alter the output from any given input. Time is a possible input variable and is measured in seconds using whole integers. i.e. after 100 seconds the time value will be 100.

    I want to create a function that converts time into a progression from -1 through to 1, only to begin again at -1 and repeat indefininitely. So no matter how large the time input the output will always be between -1 and 1.

    I hope this is not to much of an odd request and not in the wrong place! I'm not really a mathematician so was unsure exactly what this is classified as.

    Thanks in advance. Rob
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Grandad's Avatar
    Joined
    Dec 2008
    From
    South Coast of England
    Posts
    2,570
    Thanks
    1
    Hello Rob

    Welcome to Math Help Forum!
    Quote Originally Posted by Scifinity View Post
    Hi Guys,

    The problem up front:

    How to convert a steadily increasing number into a resetting, repeating sequence.

    Background:

    I am creating an animation in Vue 7. I have a grayscale image map in which black = -1 and white = 1. It can be attched to any output node to produce varying color, transparency etc.

    It is possible to connect various nodes that have mathematical functions to alter the output from any given input. Time is a possible input variable and is measured in seconds using whole integers. i.e. after 100 seconds the time value will be 100.

    I want to create a function that converts time into a progression from -1 through to 1, only to begin again at -1 and repeat indefininitely. So no matter how large the time input the output will always be between -1 and 1.

    I hope this is not to much of an odd request and not in the wrong place! I'm not really a mathematician so was unsure exactly what this is classified as.

    Thanks in advance. Rob
    It sounds as if you want some sort of 'saw-tooth' function such as the one in the diagram I've attached. If so, you'll need to investigate the use of the 'floor' function which returns the largest integer less than or equal to the number that's fed into it.

    floor(x) is denoted like this: \lfloor x \rfloor, and the function I've used to produce the attached graph is:
    y = x-1-2\left\lfloor\frac{ x}{2} \right\rfloor
    I used Excel to produce this graph, where the INT function is the same as 'floor'.

    Grandad
    Attached Thumbnails Attached Thumbnails Converting time into a repeating sequence.-untitled.jpg  
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Newbie Scifinity's Avatar
    Joined
    Feb 2010
    From
    West Sussex
    Posts
    2

    Smile Sawtooth Solution

    Thanks! The sawtooth did indeed convert the time input into a resetting sequence . Training for Vue is very basic and it is near on impossible to find good resources to aid in understanding the function. From my limited maths knowledge (GCSE) I can see the program is very powerful. The entire underlying process is mathmatical yet all tutorials work on the UI.

    Solving the time issue has shown me that my image map has to be altered to get the effect I am looking for (something like the pulsing in the vista progress bar) I will post a link to a short video of the result as an additional thank you.

    I come up with issues like this all the time so I will put them to you if you are up to the challenge!

    Thanks again.

    Rob.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: December 19th 2011, 04:27 PM
  2. Converting a Repeating Decimal to a Fraction
    Posted in the Algebra Forum
    Replies: 3
    Last Post: July 23rd 2011, 04:48 AM
  3. Replies: 8
    Last Post: December 22nd 2010, 02:48 PM
  4. Replies: 2
    Last Post: January 20th 2010, 03:43 PM
  5. non-repeating decimal
    Posted in the Algebra Forum
    Replies: 2
    Last Post: July 18th 2007, 09:53 PM

Search Tags


/mathhelpforum @mathhelpforum