top of page
COZY COZY WORLD
I am an ordinary Japanese salaryman in his 50's.
The posts are mostly about my attempts at programming which I have taken up recently to maintain logical thinking.
And a bit about my travels around the country.
Home: ようこそ!
Search
cedarcantab
Mar 8, 20244 min read
Planes & Halfspaces
A plane in 3D space can be thought of as a flat surface extending indefinitely in all directions. It can be described in several...
3 views0 comments
cedarcantab
Mar 6, 20243 min read
Sweep and Prune [WIP]
The brute-force implementation of broad phase for n objects consists in conducting n(n-1)/2 collision tests. Thus it has a complexity of...
1 view0 comments
cedarcantab
Mar 6, 202416 min read
p2 world
var GSSolver = require('../solver/GSSolver') , vec2 = require('../math/vec2') , Shape = require('../shapes/Shape') , ...
4 views0 comments
cedarcantab
Mar 6, 20244 min read
p2 sweep & prune
a.k.a. Sort and sweep For each axis, Create sorted list of start and end points of intervals for each box (use Insert Sort to exploit...
2 views0 comments
cedarcantab
Mar 6, 20247 min read
GJK, Part XX: Distance to Polygon
// GJK using Voronoi regions (Christer Ericson) and Barycentric coordinates. void b2Distance(b2DistanceOutput* output, b2SimplexCache*...
9 views0 comments
cedarcantab
Mar 6, 20243 min read
TriangleShape
class Triangle { constructor() { Triangle.constructor_.apply(this, arguments) } static constructor_() { this.p0 = null this.p1 = null...
9 views0 comments
cedarcantab
Mar 6, 20243 min read
Closest Point to Polygon from Point
library of spatial predicates and functions I have a point that may be inside or outside a polygon, I need to find the nearest point ont...
11 views0 comments
cedarcantab
Mar 5, 20243 min read
Test point inside Triangle
A typical application of barycentric coordinates is to parameterize triangles (or the planes of the triangles). Consider a triangle ABC...
1 view0 comments
cedarcantab
Mar 5, 20244 min read
Closet Point on Triangle to Point
Given a triangle ABC and a point P, let Q describe the point on ABC closest to P. One way of obtaining Q is to rely on the fact that if P...
1 view0 comments
cedarcantab
Mar 5, 20242 min read
Closest Point to Segment
Let AB be a line segment specified by the endpoints A and B. Given an arbitrary point Q, the problem is to determine the point P on AB...
1 view0 comments
cedarcantab
Mar 3, 20242 min read
Computing Distance - Point vs Segment
Let's assume that the N-sided polygon has vertices (xi,yi) in clockwise or counterclockwise order, i=1…N, with (x0,y0)=(xN,yN), and we...
11 views0 comments
cedarcantab
Mar 3, 20247 min read
GJK in Javascript, Part 2: Distance Between Polygons
In the previous post we looked into the Dyn4J implementation of the GJK algorithm to detect overlap between two convex shapes. That...
6 views0 comments
cedarcantab
Feb 29, 20244 min read
Extending Box2D-Lite in Javascript: Clipping for Contact Points
This is a continuation of our look into the CollidePolgyons method. We have delved into the Lite implementation in quite some detail and...
15 views0 comments
cedarcantab
Feb 12, 20241 min read
Studying Box2D-Lite in Javascript, Part 5.4: Submerged Area of Circle
box2d.b2CircleShape.prototype.ComputeSubmergedArea = function(normal, offset, xf, c) { /** @type {box2d.b2Vec2} */ var p =...
8 views0 comments
cedarcantab
Feb 12, 20243 min read
Douglas Peuker Algorithm
## Bing Certainly! The Ramer–Douglas–Peucker algorithm, also known as the Douglas–Peucker algorithm, is a method for simplifying a curve...
3 views0 comments
cedarcantab
Feb 12, 20241 min read
Particles and Rigid Body / Marching Squares & DPS
buildLand:function(){ this.xs=1; this.ys=0; this.mypoly.removeAll(true); points.x=[]; points.y=[]; superData=this.land.context.getImageDa...
5 views0 comments
cedarcantab
Feb 12, 20242 min read
Marching Cube
Grid Class class GRIDCELL { constructor(f, origin, scale) { this.pos = new Vector3(); // "position" of the cube this.f = f; this.origin =...
1 view0 comments
cedarcantab
Feb 12, 20248 min read
Delaunay Triangulation
https://github.com/darkskyapp/delaunay-fast?tab=readme-ov-file var Delaunay; (function() { "use strict"; var EPSILON = 1.0 / 1048576.0;...
2 views0 comments
cedarcantab
Feb 11, 20241 min read
Rigid Body with Particles like Noita [WIP]
https://youtu.be/prXuyMCgbTc PieKing1215/FallingSandSurvival: 2D survival game inspired by Noita and slightly Terraria (github.com)...
1 view0 comments
cedarcantab
Feb 7, 20243 min read
Collision Filtering
b2Filter https://box2d.org/documentation/structb2_filter.html b2FilterData.b2FilterData = function () { this.categoryBits = 0x0001;...
6 views0 comments
Home: Blog2
Home: 配信登録
bottom of page