private Vector3d AdjustAccelerationForColourSensitivity(Vector3d vectorBetweenPoints, Hole other) { //return (1 - this.colourSensitivityRepulsion) * vectorBetweenPoints + this.colourSensitivityRepulsion * 1/(1-other.brightness) * vectorBetweenPoints; return (1 - this.colourSensitivityRepulsion) * vectorBetweenPoints + this.colourSensitivityRepulsion * other.brightness * other.brightness * vectorBetweenPoints; }
/// <summary> /// Initializes hole cutters on mesh /// </summary> /// <param name="mesh">Mesh on which holes are intented to be distributed</param> /// <param name="force">The size of the force working between the holes on the mesh.</param> /// <param name="colourSensitivityRepulsion">Double between 0 and 1 to determine the coloursensitivity of a point</param> /// <param name="numPoints">number of holes on mesh</param> /// <param name="brightnesses">list of brightnesses for all points</param> /// <returns>List of holes</returns> private List<Hole> CreateHolesWithInitialData(Mesh mesh, double force, double colourSensitivityRepulsion, double colourSensitivityRadius, int numPoints, List<double> brightnesses) { List<Hole> holes = new List<Hole>(numPoints); for (int i = 0; i < numPoints; i++) { Hole tempHole = new Hole(points[i], velocities[i], mesh, radius[i], force, vertices, brightnesses[i], colourSensitivityRepulsion, colourSensitivityRadius); holes.Add(tempHole); } return holes; }