Skip to content
Snippets Groups Projects
warpproj.cf 634 B
Newer Older
#! /usr/bin/env partiview

datavar	0 id
datavar 1 a
datavar 2 b
datavar 3 c
datavar 4 d

# Project from 3+5-dimensions to 3-D
#  x' = 1*a
#  y' = 1*b + (-1)*(c - 0.5)
#  z' = (-1)*d

warp -wx a:1  -wy b:1,-1  -wz d:-1  -ref c:0.5

# Note that you can also involve the original 3-D position in these
# expressions.  Just call them "x", "y", "z", as in
#   warp -wx y:1  -wy a:1, z:1  -wz b:2  -add 0,0,-0.5
# which would yield
#   x' = y
#   y' = a + z
#   z' = 2*b - 0.5

eval color id
eval lum const 800


-.5 -.3 -1	10	1	2	0	1
-.5 -.3 -.5	20	1	0	0	0.5
-.5 -.3 0	30	1.5	2.5	0	1
-.5 -.3 .5	40	2.5	2.5	0	1.25
-.5 -.3 1	50	0	-.5	0	-.5