Mouseover to repel nodes. Adapted from my talk on force layouts. Compare to the canvas version.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Represents the area outside of the triangulation. | |
// Halfedges on the convex hull (which don't have an adjacent halfedge) | |
// will have this value. | |
#define DELAUNATOR_INVALID_INDEX TNumericLimits<int32>::Max() | |
bool Orient(const FVector2D A, const FVector2D Q, const FVector2D R) | |
{ | |
return (Q.Y - A.Y) * (R.X - Q.X) - (Q.X - A.X) * (R.Y - Q.Y) < 0.f | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Class which handles the display of various palette-based move fx animations. | |
* | |
* These effects operate on a bitmap which stores a capture of the state of the screen, | |
* and then modifies the 4-color palettes used to draw specific areas of the screen. | |
* | |
* There are a number of palette effects available: | |
* | |
* INVERT: Inverts the palette's order. | |
* LIGHTEN1, 2, 3, 4: Lightens the palette, by 1, 2, 3, or 4 steps. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function NumRegUnico( obj, transaction ) { | |
console.log("Entering NumRegUnico"); | |
return new Promise( ( resolve, reject ) => { | |
sql.connect( config ).then( recordsets => { | |
var request = new sql.Request( transaction ); | |
request.output( 'NuevoNumReg', sql.char ); | |
request.execute( 'dbo.uspNuevoRegistro' ).then( recordsets => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sendCotizacion(db, userName, productsObjArray, totalsObj, clientData, res, req) { | |
const pool = new sql.connect(config, err => { | |
console.log("err: " + err) | |
}); | |
const transaction = new sql.Transaction(pool); | |
transaction.begin(err => { | |
if (err) { | |
console.log("err" + err); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var order, pathPoints, knots; // the regular stuff goes in these | |
var nSegments = 500; | |
var segments = [0], p0; | |
for (var i = 0; i <= nSegments; i++) { | |
var t = i / nSegments; | |
var p1 = bSpline(t, order, pathPoints, knots); | |
if (p0) { | |
var dx = p0[0] - p1[0]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
} | |
.space { | |
position: absolute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
} | |
.space { | |
position: absolute; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
body { | |
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; | |
} | |
.space { | |
position: absolute; |