/** * Calculates the position on the spiral for the specified polar angle. This takes an additional * parameter of a {@link Vector3} which will be set to the calculated position. * * @param result {@link Vector3} to set with the updated position. * @param theta {@code double} the polar angle to calculate for, in degrees. */ public void calculatePointDegrees(Vector3 result, double theta) { calculatePoint(result, Math.toRadians((mSpiralIn ? mThetaOffset - theta : theta + mThetaOffset))); }
/** * Constructs a {@link LogarithmicSpiral3D} with the specified parameters. * * @param density {@code double} Factor which determines how tightly the spiral is curled. Larger values result in tighter curling. * @param start {@link Vector3} The point where the spiral should start from. * @param normal {@link Vector3} The normal vector of the plane the spiral is in. This is assumed to be * orthogonal to the vector formed from the start to the origin. * @param spiralIn {@code boolean} True if the spiral should move from the staring point in. False to move from starting point out. */ public LogarithmicSpiral3D(double density, Vector3 start, Vector3 normal, boolean spiralIn) { super(density, start, normal, spiralIn); // Calculate the remaining conditions a = mStart.length(); // Calculate the starting offset mThetaOffset = mSpiralIn ? calculateThetaForRadius(mStart.length()) : mRotation.getXAxis().angle(mStart); }
/** * Constructs a {@link LogarithmicSpiral3D} with the specified parameters. * * @param density {@code double} Factor which determines how tightly the spiral is curled. Larger values result in tighter curling. * @param start {@link Vector3} The point where the spiral should start from. * @param normal {@link Vector3} The normal vector of the plane the spiral is in. This is assumed to be * orthogonal to the vector formed from the start to the origin. * @param spiralIn {@code boolean} True if the spiral should move from the staring point in. False to move from starting point out. */ public LogarithmicSpiral3D(double density, Vector3 start, Vector3 normal, boolean spiralIn) { super(density, start, normal, spiralIn); // Calculate the remaining conditions a = mStart.length(); // Calculate the starting offset mThetaOffset = mSpiralIn ? calculateThetaForRadius(mStart.length()) : mRotation.getXAxis().angle(mStart); }
/** * Calculates the position on the spiral for the specified polar angle. This takes an additional * parameter of a {@link Vector3} which will be set to the calculated position. * * @param result {@link Vector3} to set with the updated position. * @param theta {@code double} the polar angle to calculate for, in degrees. */ public void calculatePointDegrees(Vector3 result, double theta) { calculatePoint(result, Math.toRadians((mSpiralIn ? mThetaOffset - theta : theta + mThetaOffset))); }