def on_ball_click(self, ball): self.display_preview_card(ball.content) # Hover state if double_click: window.open(ball.content.url, "_blank")
def update_physics(self, dt): self.engine.update(self.balls, dt) # Euler integration for velocity/position self.render_canvas() Google Gravity Ball Pool
def on_search(self, query): self.clear_pool() results = self.fetch_search_results(query) # JSON from Search API for rank, result in enumerate(results): ball = Ball( radius=10 + (rank * 0.5), # Slight size advantage for top results mass=rank+1, content=result.url, color=hash_to_color(result.domain) ) # Inject ball at random x-position above pool ball.position = (random(50, viewport.width-50), -20) self.balls.append(ball) self.engine.start_simulation() def on_ball_click(self, ball): self
| Action | Standard Search | Gravity Ball Pool Equivalent | |--------|----------------|------------------------------| | Submit query | Press Enter | Balls representing results rain into the pool from top-center | | Select result | Click link | Physically click on a ball → expands into a floating card with URL; double-click to open | | Refine search | Modify query and resubmit | "Shake" the pool (clear button) – balls disappear; new query spawns new set | | Prioritize result | Rank is vertical | User can drag preferred balls to the "top" of the pool (visual prioritization) | | Serendipitous discovery | N/A | Collisions cause balls to cluster – clicking a cluster suggests hybrid search terms | # Pseudo-code for core physics loop (client-side) class GravityBallPool: def init (self): self.engine = PhysicsEngine(gravity=9.8, friction=0.3) self.balls = [] # List of result balls self.query = "" "_blank") def update_physics(self
This page is only available in English
def on_ball_click(self, ball): self.display_preview_card(ball.content) # Hover state if double_click: window.open(ball.content.url, "_blank")
def update_physics(self, dt): self.engine.update(self.balls, dt) # Euler integration for velocity/position self.render_canvas()
def on_search(self, query): self.clear_pool() results = self.fetch_search_results(query) # JSON from Search API for rank, result in enumerate(results): ball = Ball( radius=10 + (rank * 0.5), # Slight size advantage for top results mass=rank+1, content=result.url, color=hash_to_color(result.domain) ) # Inject ball at random x-position above pool ball.position = (random(50, viewport.width-50), -20) self.balls.append(ball) self.engine.start_simulation()
| Action | Standard Search | Gravity Ball Pool Equivalent | |--------|----------------|------------------------------| | Submit query | Press Enter | Balls representing results rain into the pool from top-center | | Select result | Click link | Physically click on a ball → expands into a floating card with URL; double-click to open | | Refine search | Modify query and resubmit | "Shake" the pool (clear button) – balls disappear; new query spawns new set | | Prioritize result | Rank is vertical | User can drag preferred balls to the "top" of the pool (visual prioritization) | | Serendipitous discovery | N/A | Collisions cause balls to cluster – clicking a cluster suggests hybrid search terms | # Pseudo-code for core physics loop (client-side) class GravityBallPool: def init (self): self.engine = PhysicsEngine(gravity=9.8, friction=0.3) self.balls = [] # List of result balls self.query = ""