Results 1 to 7 of 7

Thread: Chart Problem

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    Chart Problem

    On a 'spiders web' chart made up of regular triangles (making a regular polygon), how do you work out the value at any given point, if you know the coordinates of the point and the coordinates of the chart centre?

    (Obviously you know the range of the chart too)

    I did a little diagram...

    Its not necessarily a hexagon btw
    Attached Images Attached Images  

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  2. #2
    Retired G&G Mod NoteMe's Avatar
    Join Date
    Oct 2002
    Location
    @ Opera Software
    Posts
    10,190
    What do you mean by value of the point. Do you mean the coordinates?

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337
    Take the hexagon chart as an example.

    The chart has a scale, say 0 at the origin, 100 at the outside point.

    So, for instance, the 'value' of 50 describes a smaller hexagon around the mid-point of the chart lines.

    So say you display the chart on a screen and you want to display the value under the mouse pointer. You have the coords of the chart origin and the coords of the mouse pointer, how do you use those to calculate the 'value' at the mouse pointer....

    Clear?

    As mud probably!

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  4. #4
    I don't do your homework! opus's Avatar
    Join Date
    Jun 2000
    Location
    Good Old Europe
    Posts
    3,863
    No, not clear.
    What would be the value in your little diagram?, that might help!
    You're welcome to rate this post!
    If your problem is solved, please use the Mark thread as resolved button


    Wait, I'm too old to hurry!

  5. #5
    pathfinder NotLKH's Avatar
    Join Date
    Apr 2001
    Posts
    2,397
    There are many ways to create mappings, and to intertranslate between is difficult, if you don't provide a clear explanation of your before and after.

    However, even though you claim you're not mapping hexes, perhaps this thread might provide some help?


    -Lou

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Feb 2000
    Location
    Sedgefield
    Posts
    337

    OK...try and do better...

    I redid the pic to try and make things clearer.

    But I want to calculate this from the coordinates, and the knowledge of the number of sides in the polygon (and hence the angles in each triangle).

    The value is a+b, which is relatively easy to get (I think), but how do you translate this if the point isn't in the first segment?

    (Also, the coordinate system is not related to the graph scale, so a ratio will have to be used, that is ratio of a+b to the full scale of the chart).

    Attached Images Attached Images  
    Last edited by Judd; May 28th, 2004 at 04:30 AM.

    Dan

    Outside of a dog, a book is a man's best friend.
    Inside of a dog, it's too dark to read.

  7. #7
    Fanatic Member sql_lall's Avatar
    Join Date
    Jul 2002
    Location
    Up Above (i.e. AUS)
    Posts
    571
    hmmm...am i correct in thinking that you want the 'value' (a+b) given the (x,y) co-ordinates of the point?

    In this case:
    |a| = |y|
    tan(@) = |x|/|b| => |b| = |x|/tan(@)

    => |a| + |b| = |y| + |x|/tan(@)
    => (a+b) = value = |y| + |x|/tan(@)

    where |x| = abs(x) = (x>0) ? x : -x;
    sql_lall

Posting Permissions

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



Click Here to Expand Forum to Full Width