1Hyperbolic Geometry for VisualizationMike [email protected] – February 16, 2011Oregon State UniversityComputer GraphicsOregon State UniversityZooming 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 GraphicsUsual Zooming in Euclidean Spacemjb – February 16, 2011Oregon State UniversityComputer Graphics123,101 line strips446,585 pointsZooming in Polar Hyperbolic Spacemjb – February 16, 2011Oregon State UniversityComputer GraphicsPolar Hyperbolic Equations(X Y)R R’ = R / (R+K)X’ = R’cosΘ’Y’ R’ iΘ’Overall theme: something divided by something a little biggermjb – February 16, 2011Oregon State UniversityComputer Graphics(X,Y)Θ Θ’ = ΘY’ = R’sinΘ’1'lim0RK0'limRKthen:'RRRKBecauseYXR22)(tan1XYRR'Polar Hyperbolic Equations Don’t Actually Need to use TrigCoordinates moved to outer edge when K = 0mjb – February 16, 2011Oregon State UniversityComputer GraphicsKRKRXRXKRRRX cos''''sinRY YYRRKR RK Coordinates moved to center when K = ∞2KRXX'Cartesian Hyperbolic Equations – Treat X and Y IndependentlyKRYY'{Polarmjb – February 16, 2011Oregon State UniversityComputer GraphicsKXXX22'KYYY22'{CartesianCoordinates moved to outer edge when K = 0Coordinates moved to center when K = ∞Zooming 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.mjb – February 16, 2011Oregon State UniversityComputer GraphicsThis kind of situation is called a T-intersection, and crops up all the time in computer graphics. A Solution to the T-Intersection ProblemBreak this line up into several (many?) sub-pieces, and perform the Hyperbolic Transformation on each intermediate point.01() (1 )PttPtP t = 0., .01, .02, .03, …mjb – February 16, 2011Oregon State UniversityComputer GraphicsThis makes that straight line into a curve, as it should be. But, how many line segments should we use?A More Elegant Approach is to Recursively SubdividevoidDrawHyperbolicLine( P0, P1){Compute pointConvert point A to Hyperbolic Coordinates, calling it A’Convert P0and P1to Hyperbolic Coordinates P0’, P1’Compute pointCompare A’and B012.PPA01'''2.PPBmjb – February 16, 2011Oregon State UniversityComputer GraphicsCompare A and Bif( they are “close enough” ){Draw the line P0’-P1’}else{DrawHyperbolicLine( P0, A );DrawHyperbolicLine( A, P1);}} Subdividing to render a curve correctly is a recurring theme in computer graphics.3Hyperbolic Corvallis (Streets, Buildings, Parks)Kelley Engineering Centermjb – February 16, 2011Oregon State UniversityComputer Graphicsmjb – February 16, 2011Oregon State UniversityComputer
View Full Document