simulations.experiments.electrostatics
Class ColorTestExperiment

java.lang.Object
  extended bysimulations.experiments.BaseExperiment
      extended bysimulations.experiments.electrostatics.ColorTestExperiment

public class ColorTestExperiment
extends BaseExperiment

Color Test exeriment with a simple field

Version:
1.0
Author:
John Belcher

Nested Class Summary
private  class ColorTestExperiment.Motion
          The equation of motion governing the evolution of the system
 
Field Summary
private  double ACT
          The value at the origin of the color test field
private  double BCT
          The slope of the color test field
private  EMCollection collection
           
private  ColorTestField ctf
          The first charge, which moves
private  ColorTestExperiment.Motion equations
          The equation of motion for the system (just Coulomb repulsion)
private  RungeKuttaIntegration integrator
          The integrator used to evolve the system
private  double t
          The time t
 
Fields inherited from class simulations.experiments.BaseExperiment
eps, FieldMotionType, FieldType, FluidFlowSpeed, Fnorm, Fpower, numberSmallSteps
 
Constructor Summary
ColorTestExperiment(double ACT, double BCT)
          Constructs the color test field
 
Method Summary
 void ConstructEMSource()
          Construct the EMColletion object
 void Evolve(double dt)
          Evolves the experiment by a time step "dt" using an RK4 integrator by taking numberSmallSteps between t and t + dt, for accuracy.
 void Evolve(double dt, double maxStep)
          Evolves the experiment a time step dt
 BaseObject getEMSource()
          Returns the BaseObject that is colortest field alone
 double getFlowSpeed(Vec3 r, Vec RegionFlow)
          Method to find the flow speed in a given region when we are determining that speed according to region.
 double getFlowSpeed(Vec3 r, Vec RegionFlow, Vec RegionParameter)
           
 double getHue(double TargetHue, Vec2 xpos, Vec RegionColor, Vec RegionParameter)
           
 double getHue(double TargetHue, Vec3 r, Vec RegionColor)
          Method to find the hue in a given region when we are coloring according to region (Color Mode 4).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACT

private double ACT
The value at the origin of the color test field


BCT

private double BCT
The slope of the color test field


t

private double t
The time t


ctf

private ColorTestField ctf
The first charge, which moves


collection

private EMCollection collection

equations

private ColorTestExperiment.Motion equations
The equation of motion for the system (just Coulomb repulsion)


integrator

private RungeKuttaIntegration integrator
The integrator used to evolve the system

Constructor Detail

ColorTestExperiment

public ColorTestExperiment(double ACT,
                           double BCT)
Constructs the color test field

Parameters:
ACT - the value of the z component of the field at the origin
BCT - the slope of the z component of the field
Method Detail

ConstructEMSource

public void ConstructEMSource()
Construct the EMColletion object

Specified by:
ConstructEMSource in class BaseExperiment

getEMSource

public BaseObject getEMSource()
Returns the BaseObject that is colortest field alone

Specified by:
getEMSource in class BaseExperiment

Evolve

public void Evolve(double dt,
                   double maxStep)
Evolves the experiment a time step dt


getHue

public double getHue(double TargetHue,
                     Vec2 xpos,
                     Vec RegionColor,
                     Vec RegionParameter)

getFlowSpeed

public double getFlowSpeed(Vec3 r,
                           Vec RegionFlow,
                           Vec RegionParameter)

Evolve

public void Evolve(double dt)
Evolves the experiment by a time step "dt" using an RK4 integrator by taking numberSmallSteps between t and t + dt, for accuracy.

Specified by:
Evolve in class BaseExperiment

getHue

public double getHue(double TargetHue,
                     Vec3 r,
                     Vec RegionColor)
Method to find the hue in a given region when we are coloring according to region (Color Mode 4).

Specified by:
getHue in class BaseExperiment
Parameters:
TargetHue - This is the target hue from the renderer.
r - This is the vector postion of the point in the image.
RegionColor - This is the varous hues for the regions.
Returns:
The hue for the part of the image map at r.

getFlowSpeed

public double getFlowSpeed(Vec3 r,
                           Vec RegionFlow)
Method to find the flow speed in a given region when we are determining that speed according to region. This method is used when we have set experiment.FieldMotionType to one of either Constants.FIELD_MOTION_VREFIELD or Constants.FIELD_MOTION_VRBFIELD.

Specified by:
getFlowSpeed in class BaseExperiment
Parameters:
r - This is the vector postion of the point in the image.
RegionFlow - This is the flow speeds for the regions.
Returns:
The flow speed for the part of the image map at r.