Skip to content Skip to sidebar Skip to footer
Showing posts with the label Geometry

Collision Detection Between A Line And A Circle In Javascript

I'm looking for a definitive answer, maybe a function cos I'm slow, that will determine if … Read more Collision Detection Between A Line And A Circle In Javascript

Calculate The Point Of Intersection Of Circle And Line Through The Center

How do i get the point of intersection of a line and a circle.. I got lots of information on this t… Read more Calculate The Point Of Intersection Of Circle And Line Through The Center

Optimize Path Distance From Circle Calculation In D3

In this D3.js graph I'm using the magic numbers 20 when the line is straight and 30 when the li… Read more Optimize Path Distance From Circle Calculation In D3

Find Rectangle Boundary Point At An Angle From Point That Is Not In The Middle Of The Rectangle

I am trying to display where, in a rectangle, is player aiming in my game. He's in such a squar… Read more Find Rectangle Boundary Point At An Angle From Point That Is Not In The Middle Of The Rectangle

Translate A Plane By Rotating A Circle With The Mouse

I have two button(the arrows), when they are pressed everything works as expected. What is not wor… Read more Translate A Plane By Rotating A Circle With The Mouse

Create Equilateral Triangle In The Middle Of Canvas?

I want to draw an equilateral triangle in the middle of canvas. I tried this: ctx.moveTo(canvas.wid… Read more Create Equilateral Triangle In The Middle Of Canvas?

How To Calculate Rotation Angle From Rectangle Points?

I have 4 points 1,2,3,4 that closes a rectangle. The points are in a array in this following way: x… Read more How To Calculate Rotation Angle From Rectangle Points?

Arc Via 3 Points In Specific Direction

I need to draw the arc from 3 points in specific direction. Lets say i have 3 vec2 points P1, P2, P… Read more Arc Via 3 Points In Specific Direction