Hyperbolic Geometry for Visualizationweb.engr.oregonstate.edu/~mjb/cs553/Handouts/hyperbolic...1 mjb...

7
1 mjb – February 28, 2019 Computer Graphics 1 Hyperbolic Geometry for Visualization hyperbolic.ppts Mike Bailey [email protected] mjb – February 28, 2019 Computer Graphics 2 Zooming and Panning Around a Complex 2D Display • Standard (Euclidean) geometry zooming forces much of the information off the screen • This eliminates the context from the zoomed-in display • This problem can be solved with hyperbolic methods if we are willing to give up Euclidean geometry

Transcript of Hyperbolic Geometry for Visualizationweb.engr.oregonstate.edu/~mjb/cs553/Handouts/hyperbolic...1 mjb...

  • 1

    mjb – February 28, 2019Computer Graphics

    1

    Hyperbolic Geometry for Visualization

    hyperbolic.ppts

    Mike [email protected]

    mjb – February 28, 2019Computer Graphics

    2Zooming and Panning Around a Complex 2D Display

    • Standard (Euclidean) geometry zooming forces much of the information off the screen

    • This eliminates the context from the zoomed-in display

    • This problem can be solved with hyperbolic methods if we are willing to give up Euclidean geometry

  • 2

    mjb – February 28, 2019Computer Graphics

    3Usual Zooming in Euclidean Space

    123,101 line strips446,585 points

    mjb – February 28, 2019Computer Graphics

    4Zooming in Polar Hyperbolic Space

  • 3

    mjb – February 28, 2019Computer Graphics

    5Polar Hyperbolic Equations

    (X,Y)

    R

    Θ

    R’ = R / (R+K)

    Θ’ = Θ

    X’ = R’cosΘ’Y’ = R’sinΘ’

    Overall theme: something divided by something else a little bigger

    1'lim0

    RK

    0'lim

    RK

    then:'RR

    R K

    Because

    mjb – February 28, 2019Computer Graphics

    6

    YXR 22

    )(tan 1 XY

    KRRR

    '

    KRX

    RX

    KRRRX

    cos''

    ' 'sin R Y YY RR K R R K

    Polar Hyperbolic Equations Don’t Actually Need to use Trig

    Coordinates moved to outer edge when K = 0

    Coordinates moved to center when K = ∞

  • 4

    mjb – February 28, 2019Computer Graphics

    7

    KRXX

    '

    Cartesian Hyperbolic Equations – Treat X and Y Independently

    KRYY

    '

    KX

    XX22

    '

    KY

    YY22

    '

    {{Polar

    Cartesian

    Coordinates moved to outer edge when K = 0

    Coordinates moved to center when K = ∞

    mjb – February 28, 2019Computer Graphics

    8Zooming in Cartesian Hyperbolic Space

  • 5

    mjb – February 28, 2019Computer Graphics

    9The Problem with T-Intersections

    mjb – February 28, 2019Computer Graphics

    10The Problem with T-Intersections

    Your code computes the hyperbolic transformation here and here, and OpenGL draws a straight line between them. But, this point had its hyperbolic transformation computed separately, and doesn’t match up with the straight line.

    This kind of situation is called a T-intersection, and crops up all the time in computer graphics, even though we don’t want it to.

  • 6

    mjb – February 28, 2019Computer Graphics

    11A Solution to the T-Intersection Problem

    Break this line up into several (many?) sub-pieces, and perform the Hyperbolic Transformation on each intermediate point.

    This makes that straight line into a curve, as it should be. But, how many line segments should we use?

    0 1( ) (1 )P t t P tP t = 0., .01, .02, .03, …

    mjb – February 28, 2019Computer Graphics

    12A More Elegant Approach is to Recursively Subdivide

    voidDrawHyperbolicLine( P0, P1 ){

    Compute point

    Convert point A to Hyperbolic Coordinates, calling it A’

    Convert P0 and P1 to Hyperbolic Coordinates P0’, P1’

    Compute point

    Compare A’ and Bif( they are “close enough” ){

    Draw the line P0’-P1’}else{

    DrawHyperbolicLine( P0, A );DrawHyperbolicLine( A, P1 );

    }}

    0 1

    2.P PA

    0 1' ''2.

    P PB

    Subdividing to render a curve or surface correctly is a recurring theme in computer graphics.

  • 7

    mjb – February 28, 2019Computer Graphics

    13Hyperbolic Corvallis (Streets, Buildings, Parks)

    Kelley Engineering

    Center

    mjb – February 28, 2019Computer Graphics

    14

    http://www.sott.net/articles/show/215021-Hyperbolic-map-of-the-internet-will-save-it-from-COLLAPSE