User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: Suggestions for Calculation of coordinate within a circumplex based on variables

  1. #1
    Clicker Fusion 2.5
    stuartmaughan's Avatar
    Join Date
    Feb 2015
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Suggestions for Calculation of coordinate within a circumplex based on variables

    Hello Clickteam people!

    I may need a little help regarding methods to best calculate a coordinate within circumplex based on variables, an example of how intended it to visually look like:



    Each variable is intended to be a relative percentage; so A to H range from 1-100% (or 0.0-1.0)with the sum of 100%(1), I am looking for a way to calcuate the specific (x,y) coordinate calcuation from all of these eight variables. I have a few very basic ways of doing it based on degrees but no directly in terms of the eight variables. I am gussing it may be something to do with matricies, I've looked over the topic and during stand the basic functions of it but I am not sure how I would apply it to this coordinate calculation, if that even works.

    Smart mathamatitions, please let me know if know what I should look into!

    Thanks a lot for your time,
    Stuart

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Not 100% sure I understood your needs (but seems cool! )
    ..wouldn't sin(angle) & cos(angle) be enough to get the intersecting coordinates?

    Like, with 8 variables every sector is 45░ wide,
    D sector starting coordinate in the circle border is:

    originX + radius*cos(305)
    originY - radius*sin(305)

    so it should be:

    originX + radius*cos(360-(360.0/number of variables * current variable number -90))
    originY - radius*sin(360-(360.0/number of variables * current variable number -90))

    360- thing is because we calculate direction clockwise (while angle is standard counterclockwise)
    -90 thing is because we start from top (A), instead of starting from right (C) which is standard 0 degrees

    edit___

    thinking at this... I may have completely misunderstood your needs
    you may possibly need to address values inside single sectors?
    you could simply scale an active for the sector
    see quick example:

    circumplex.mfa

    (hover a sector to see its name/percentage, hold left click to raise percentage, hold right click to lower percentage)
    (note: used your sketch but some degrees were a little offrange, like H, thus some difference in sector width in respect to the real sector)

  3. #3
    Clicker Fusion 2.5
    stuartmaughan's Avatar
    Join Date
    Feb 2015
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Love the .mfa

  4. #4
    Clicker Fusion 2.5
    stuartmaughan's Avatar
    Join Date
    Feb 2015
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by schrodinger View Post
    Not 100% sure I understood your needs (but seems cool! )
    ..wouldn't sin(angle) & cos(angle) be enough to get the intersecting coordinates?

    Like, with 8 variables every sector is 45░ wide,
    D sector starting coordinate in the circle border is:

    originX + radius*cos(305)
    originY - radius*sin(305)

    so it should be:

    originX + radius*cos(360-(360.0/number of variables * current variable number -90))
    originY - radius*sin(360-(360.0/number of variables * current variable number -90))

    360- thing is because we calculate direction clockwise (while angle is standard counterclockwise)
    -90 thing is because we start from top (A), instead of starting from right (C) which is standard 0 degrees

    edit___

    thinking at this... I may have completely misunderstood your needs
    you may possibly need to address values inside single sectors?
    you could simply scale an active for the sector
    see quick example:

    circumplex.mfa

    (hover a sector to see its name/percentage, hold left click to raise percentage, hold right click to lower percentage)
    (note: used your sketch but some degrees were a little offrange, like H, thus some difference in sector width in respect to the real sector)
    Thanks for the Quick reply!
    Essentially its to calculate interpersonality, I've looked through quite a few physiology papers on it but do not seem to find anything suitable in terms of calculating it based on my knowledge (http://personalityresearch.org/acton/ipc.pdf). The goal is to find what any coordinate is based on the relationship between the Eight variables. This might help clear up some explainations haha:
    https://www.youtube.com/watch?v=fevXf1CtruU

    I will need to brush up on the basic Unit Circle (http://www.mathopenref.com/coordparamcircle.html), but I think I understand what you mean,
    To get a coordinate within the circle itself and not just along the circumference, I am assuming that the radius would change (0.1 to 1).

    Also the calculations:
    "originX + radius*cos(360-(360.0/number of variables * current variable number -90))
    originY - radius*sin(360-(360.0/number of variables * current variable number -90))"
    This would be for the coordinate for each specific variable sector? And current variable number could be expressed as a percentage? I hope I understood that, seems to make sense though.

    Essentially, what the game aims to do is determine the players personality by affecting each of these eight variables through various mechanics (and therefore the variables would idealy be realtive due to the endless about of actions that can be preformed over time). Based on the relationship of these variables (the player's personality) the behaviour of organism and objects change toward the player (triggled through pool activation when certain variables exceed specific %ages - very subtle at first, will need to see at their first actions will make variables very high and extreem).

    I've been thinking to make it one simple coordinate within the circle (as seen in the video link about) but maybe your method with area of each section in you epic .mfa may prove to be a better option in terms of activation simplistic and readings.

    I hope that makes it somewhat clearer, I will definitely look into the Unit circle a bit more and try and come up with a system that calculates this 'personaility' well using your equations!

  5. #5
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    wow, this is fascinating
    interesting project

    Mmm I fear I misunderstood your needs on first post (before edit part)
    plotting a single point can be a little more tricky...

    ..but I think we could use some little "shortcut" to avoid more complex calculations,
    maybe this can be suitable for you?

    circumplex_point.mfa

    I've simply averaged "active points" coordinates
    (and placed them on farthest point inside each sector)
    to find X,Y coordinates of your personality ()

  6. #6
    Clicker Fusion 2.5
    stuartmaughan's Avatar
    Join Date
    Feb 2015
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow that is quite clever haha, thanks a lot, looks like that will do it just need to take some time to understand all the code

    On a quick note, what do the functions Int and Mid$/Left$/Right$ do?

    Hehe also made a quick Colour Wheel RGB value for the coordinate as the player has an Aura around them that changes colour based on their variable composition (p.s. the player isn't meant to know that any of this is happening ^^) RGB Colour Wheel.mfa (just need to hold left click over the white circle)

    Thanks a lot again

  7. #7
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Glad you liked it, it was fun to do.. and maybe I could end up using this in the future in some way, who knows

    Mid$("string",P,n) gives you "n" characters of a "string" starting from "P" position
    I've used this with a preset "ABCDEFGH" string to "name" each sector with increasing character

    Left$/Right$("string",n) gives you "n" characters from leftmost/rightmost side of a string

    Int(n) simply returns the "integer" of a number (same number without decimals)

    Nice & fun example with the aura color! Cool!

  8. #8
    Clicker Fusion 2.5
    stuartmaughan's Avatar
    Join Date
    Feb 2015
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, yeah for some time now I've been so anoyed with the fact that I cannot use Global values for calculations, they never work, so I have been essentailly translating them all to arrays (which apparently you cannot add cells) or active object variables. I am guessing if i were to use global values I would use Round or Int?

  9. #9
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Which problems are you experiencing with global values? Odd! They should work

    You can add cells to arrays, they automatically "expand" when you write to indices outside the starting "boundaries".

    "Round" rounds to the nearest integer (1.4 >> 1 1.6 >> 2) and preserves the "floating" format
    while "int" transforms in pure integer and rounds to the smallest integer (1.4 >> 1 1.6 >> 1)
    so it's up to your need which to use
    every value, being alt. values or global values, can store either integers or floating point numbers

  10. #10
    Clicker Fusion 2.5
    stuartmaughan's Avatar
    Join Date
    Feb 2015
    Posts
    29
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Will have a deep dive play! cheers!

Page 1 of 2 1 2 LastLast

Similar Threads

  1. Adding data to list based off multiple combinations of array variables?
    By ratty in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 10th August 2013, 02:19 PM
  2. Object Selection based on XScale and SemiTrans variables
    By fawfulfan in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 23rd November 2011, 04:28 PM
  3. add 1 to counter based on an objects y coordinate
    By mrmdesign in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 14th July 2011, 02:43 PM
  4. Choosing global variables with a calculation.
    By Meanderer in forum Multimedia Fusion 2 - Technical Support
    Replies: 13
    Last Post: 15th May 2008, 03:27 PM
  5. Coordinate to test?
    By BrandonC in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 26th August 2006, 10:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •