hexToRgb(hexString)
param color: vec3
rgbToHex(color)
colors: array of colors given as RGB triples
u: parameter at which u is to be interpolated
colorscale(colors, u, umin, umax)
function rgb_vector_to_color_string(vec3)
param value: rangin from 0 to 1
param cmin, cmax: rgb triple in [0, 1]
perform linear interpolation between two colors with value as lerp parameter
mapColor(value, cmin, cmax)
function hsv_to_color_string(h, s, v)
param value: in [0, 1]
param huemin/huemax: hue for min/max value
valueconst: hsv value for both min/max hue colors
interpolate between these two colors by blending to white in the middle
mapColor(value, huemin, huemax, valueconst)
return hue, sat, val of color in hsv model, set s to 0.8 and v to 0.9
mapColor(u, maxhue)
node attributes:
d: distance
v: visited
p: previous
neighbours[i] are the neighbours of node i
bfs(nodes, neighbours, index)
dfs(nodes, neighbours, index)
index: index of node in array
param pQ: priority queue, methods push, pop, update, isEmpty
dijkstra(nodes, neighbours, index, pQ)
R: radius
node attributes to be set:
x, y: x/y positions
r: radius
c: centrality
group: node group (int)
circularLayout(nodes, R)
Zuletzt geändertvor 2 Jahren