Hyperbolic Geometry for VisualizationMike [email protected] State Universitymjb – February 16, 2011Oregon State UniversityComputer GraphicsZooming 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 withhyperbolic methodsif we are willing to give upThis problem can be solved with hyperbolic methodsif we are willing to give up Euclidean geometrymjb – February 16, 2011Oregon State UniversityComputer GraphicsUsual Zooming in Euclidean Space123,101 line strips446,585 pointsmjb – February 16, 2011Oregon State UniversityComputer GraphicsZooming in Polar Hyperbolic Spacemjb – February 16, 2011Oregon State UniversityComputer GraphicsPolar Hyperbolic EquationsOverall theme: something divided by something a little biggerR R’ = R / (R+K)(X,Y)X’ = R’cosΘ’Y’ = R’sinΘ’Θ Θ’ = Θ1'lim0RKthen:'RRBecausemjb – February 16, 2011Oregon State UniversityComputer Graphics0'limRKthen:RRKPolar Hyperbolic Equations Don’t Actually Need to use TrigYXR22)(tan1XYCoordinates moved to outer edge hK0KRRR'when K = 0Coordinates moved to center when K = ∞KRXRXKRRRX cos''KRRKR''sinRY YYRRKR RK mjb – February 16, 2011Oregon State UniversityComputer GraphicsRKR RKCartesian Hyperbolic Equations – Treat X and Y IndependentlyXX'{KRXKRYY'{PolarKRXX'{{Coordinates moved to outer edge when K = 0KXX22'{CartesianCoordinates moved to center when K = ∞KYYY22'{mjb – February 16, 2011Oregon State UniversityComputer GraphicsZooming in Cartesian Hyperbolic Spacemjb – February 16, 2011Oregon State UniversityComputer GraphicsThe Problem with T-Intersectionsmjb – February 16, 2011Oregon State UniversityComputer GraphicsThe Problem with T-IntersectionsYour 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. mjb – February 16, 2011Oregon State UniversityComputer GraphicsA Solution to the T-Intersection ProblemBreak this line up into several (many?) subpieces and perform theBreak this line up into several (many?) sub-pieces, and perform the Hyperbolic Transformation on each intermediate point.01() (1 )PttPtPThis makes that straight line into a curve, as it should t = 0., .01, .02, .03, …g,be. But, how many line segments should we use?mjb – February 16, 2011Oregon State UniversityComputer GraphicsA More Elegant Approach is to Recursively SubdividevoidDrawHyperbolicLine( P0, P1){Compute point012.PPAConvert point A to Hyperbolic Coordinates, calling it A’Convert P0and P1to Hyperbolic Coordinates P0’, P1’Ctit01'''PPBCompute pointCompare A’ and Bif( they are “close enough” ){01'2.B{Draw the line P0’-P1’}else{DrawHyperbolicLine(PA);DrawHyperbolicLine( P0, A );DrawHyperbolicLine( A, P1);}} mjb – February 16, 2011Oregon State UniversityComputer GraphicsSubdividing to render a curve correctly is a recurring theme in computer graphics.Hyperbolic Corvallis (Streets, Buildings, Parks)Kelley EngineeringEngineering Centermjb – February 16, 2011Oregon State UniversityComputer Graphicsmjb – February 16, 2011Oregon State UniversityComputer
View Full Document