Skip to content

Instantly share code, notes, and snippets.

@pomle
Created December 1, 2022 13:33
Show Gist options
  • Save pomle/2b46a0ffb3469f5a3754328a316e2dca to your computer and use it in GitHub Desktop.
Save pomle/2b46a0ffb3469f5a3754328a316e2dca to your computer and use it in GitHub Desktop.
Math
const maxArea = Math.PI * max ** 2;
const pointArea = (point.intensity / max) * maxArea;
const value = Math.sqrt(pointArea / Math.PI);
const size = 8 + (value / max) * 24;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment