// Last edited on 2013-01-22 01:28:36 by stolfilocal // Arrow field showing velocity vector. #include "general_parameters.inc" #include "sampler_grid.inc" #include "sampler_ring.inc" #macro subfig(tt) // General parameters #local zp = 0; #local tt = 0; #local Rf = 1.5; // Sampling grid radius. #local Rn = (term = 0 ? 0 : 0.75*Rf); // Round clipping radius for particle grid and fuzz. #local vmag = flow_vel_max; // Nominal max velocity for scaling. #local Ra = Rf/50; // Desirable max arrow length. #local fsa = 3.0; // Extra length factor for arrows. #local txo = texture{ tx_origin_particle } // Texture for particle at origin. // Particle grid with velocity arrows: #local np_g = 31; // Particles in sampling grid along each axis. #local fra_g = 1.0; // Extra radius factor for grid arrows. #local frp_g = 1.0; // Extra radius factor for grid particles. #local txp_g = texture{ tx_grid_particle } // Texture for grid particle. #local txa_g = texture{ tx_grid_arrow } // Texture for grid arrows. #local scene_grid = object{ sampler_grid(zp,tt, term, Rf,Rn, vmag,Ra, np_g, frp_g,txp_g, 0, fsa,fra_g,txa_g) } // Ring of particles with velocity arrows: #local Rc = 0.20*Rf; // Radius of sampling circle. #local nc = 12; // Number of particles in ring. #local frc_r = 1.0; // Extra minor radius factor for ring. #local fra_r = 2.0; // Extra radius factor for ring arrows. #local frp_r = 3.0; // Extra radius factor for ring particles. #local txc_r = texture{ tx_ring_circle } // Texture for ring's supporting circle. #local txp_r = texture{ tx_ring_particle } // Texture for ring particle. #local txa_r = texture{ tx_ring_arrow } // Texture for ring arrows. #local scene_ring = object{ sampler_ring(zp,tt, term, Rf,Rc, vmag,Ra, nc, frc_r,txc_r, frp_r,txp_r, fsa,fra_r,txa_r) } // Particle at origin: #local fra_o = 2.0; // Extra radius factor for origin arrow. #local frp_o = 3.0; // Extra radius factor for origin particle. #local txp_o = texture{ tx_origin_particle } // Texture for origin particle. #local txa_o = texture{ tx_origin_arrow } // Texture for ring arrows. #local po = < 0, 0, zp >; // Reference particle at origin. #local vo = flow_vel(po.x,po.y,po.z,tt, term); // Velocity of reference particle. #local scene_orig = object{ particle_with_arrow(po,vo, vmag,Ra, frp_o,txp_o, fsa,fra_o,txa_o) } #local scene = union{ object{ scene_grid } object{ scene_ring } object{ scene_orig } } object{ scene } #declare cam_ctr = < 0, 0, 0 >; #declare cam_rad = 0.6*Rf; #declare cam_dir = z; #end