1Hyperbolic 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 with hyperbolic methods if we are willing to give up Euclidean geometrymjb – February 16, 2011Oregon State UniversityComputer Graphics2Usual Zooming in Euclidean Spacemjb – February 16, 2011Oregon State UniversityComputer Graphics123,101 line strips446,585 pointsZooming in Polar Hyperbolic Spacemjb – February 16, 2011Oregon State UniversityComputer Graphics3Polar Hyperbolic EquationsOverall theme: something divided by something a little bigger(X,Y)RΘR’ = R / (R+K)Θ’ = ΘX’ = R’cosΘ’Y’ = R’sinΘ’mjb – February 16, 2011Oregon State UniversityComputer Graphics1'lim0RK0'limRKthen:'RRRKBecauseYXR22)(tan1YPolar Hyperbolic Equations Don’t Actually Need to use Trig)(tanXKRRR'XXRRX''Coordinates moved to outer edge when K = 0Coordinates moved to center when K = ∞mjb – February 16, 2011Oregon State UniversityComputer GraphicsKRRKRRX cos''''sinRY YYRRKR RK 4KRXX'Cartesian Hyperbolic Equations – Treat X and Y Independently{KRYY'KXXX22'{{PolarCartesianCoordinates moved to outer edge when K = 0Coordinates moved to center when K =∞mjb – February 16, 2011Oregon State UniversityComputer GraphicsKYYY22'{Coordinates moved to center when K = ∞Zooming in Cartesian Hyperbolic Spacemjb – February 16, 2011Oregon State UniversityComputer Graphics5The 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.mjb – February 16, 2011Oregon State UniversityComputer GraphicsThis kind of situation is called a T-intersection, and crops up all the time in computer graphics. 6A Solution to the T-Intersection ProblemBreak 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?01() (1 )Pt tP tPt = 0., .01, .02, .03, …mjb – February 16, 2011Oregon State UniversityComputer GraphicsA More Elegant Approach is to Recursively SubdividevoidDrawHyperbolicLine( P0, P1){Compute pointConvert point A to Hyperbolic Coordinates, calling it A’012.PPAConvert P0and P1to Hyperbolic Coordinates P0’, P1’Compute pointCompare A’ and Bif( they are “close enough” ){Draw the line P0’-P1’}else01'''2.PPBmjb – February 16, 2011Oregon State UniversityComputer Graphics{DrawHyperbolicLine( P0, A );DrawHyperbolicLine( A, P1);}} Subdividing to render a curve correctly is a recurring theme in computer graphics.7Hyperbolic Corvallis (Streets, Buildings, Parks)Kelley Engineering Centermjb – February 16, 2011Oregon State UniversityComputer Graphicsmjb – February 16, 2011Oregon State UniversityComputer
View Full Document