Package net.paulhertz.pixelaudio
Class RandomContinousGen
java.lang.Object
net.paulhertz.pixelaudio.PixelMapGen
net.paulhertz.pixelaudio.RandomContinousGen
Deprecated.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRandomContinousGen(int width, int height) Deprecated.RandomContinousGen(int width, int height, AffineTransformType type) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()Deprecated.private booleandfs(int x, int y, int width, int height, boolean[][] visited, ArrayList<int[]> path, int endX, int endY) Deprecated.int[]generate()Deprecated.Initializes this.coords, this.pixelMap, this.sampleMap: this is handled by a call to PixelMapGen's setMapsFromCoords() method.private ArrayList<int[]>generateBoustrophedonPath(int width, int height) Deprecated.private ArrayList<int[]>Deprecated.Generically-named method that calls the custom coordinate generation method for a particular PixelMapGen child class.ArrayList<int[]>generateHamiltonianPath(int width, int height, int maxAttempts) Deprecated.Generated by ChatGPT, not quite a solution to a non-trivial problem.private ArrayList<int[]>generateRandomContinuousCoordinates(int width, int height) Deprecated.private booleaninBounds(int x, int y, int width, int height) Deprecated.private int[][]Deprecated.booleanvalidate(int width, int height) Deprecated.Methods inherited from class net.paulhertz.pixelaudio.PixelMapGen
findNearestPowerOfTwoLessThan, findPowerOfTwo, getCoordinates, getCoordinatesCopy, getHeight, getInversMapFromPixelArray, getPixelMap, getPixelMapCopy, getPixelMapFromCoordinates, getSampleMap, getSampleMapCopy, getSize, getTransformType, getWidth, isPowerOfTwo, loadIndexMaps, randomTransform, setMapsFromCoords, setTransformType, transformCoords
-
Field Details
-
description
Deprecated.- See Also:
-
-
Constructor Details
-
RandomContinousGen
Deprecated. -
RandomContinousGen
public RandomContinousGen(int width, int height) Deprecated.
-
-
Method Details
-
describe
Deprecated.- Specified by:
describein classPixelMapGen- Returns:
- A String describing the mapping generated by your class and any initialization requirements.
-
validate
public boolean validate(int width, int height) Deprecated.- Specified by:
validatein classPixelMapGen- Returns:
- true if the width and height parameters are valid for creating a mapping with this generator, otherwise, false.
-
generate
public int[] generate()Deprecated.Initializes this.coords, this.pixelMap, this.sampleMap: this is handled by a call to PixelMapGen's setMapsFromCoords() method.- Specified by:
generatein classPixelMapGen- Returns:
- this.pixelMap, the value for PixelAudioMapper.signalToImageLUT.
-
generateCoordinates
Deprecated.Generically-named method that calls the custom coordinate generation method for a particular PixelMapGen child class. Here the method is generateBouCoordinates(). Additional initializations belong here, if required by your coordinate generation method, rather than in the generate() method.- Returns:
- An ArrayList<int[]> of bitmap coordinates in the order the signal mapping would visit them.
-
generateHamiltonianPath
Deprecated.Generated by ChatGPT, not quite a solution to a non-trivial problem. ChatGPT: " Thanks for the clarification — and you're absolutely right: generating a truly continuous, non-repeating, 4-connected path that visits every pixel exactly once is a classic problem. What you're asking for is essentially a Hamiltonian path over a grid graph, restricted to 4-connected neighbors. Requirements Recap: Starts at (0, 0) Visits every pixel exactly once Moves only up/down/left/right (4-connected) Never repeats, never jumps Has some randomness in the generated path " This is an NP-Complete computational problem: https://www.researchgate.net/publication/220616693_Hamilton_Paths_in_Grid_Graphs- Parameters:
width-height-- Returns:
-
dfs
private boolean dfs(int x, int y, int width, int height, boolean[][] visited, ArrayList<int[]> path, int endX, int endY) Deprecated. -
inBounds
private boolean inBounds(int x, int y, int width, int height) Deprecated. -
shuffledDirections
private int[][] shuffledDirections()Deprecated. -
generateBoustrophedonPath
Deprecated. -
generateRandomContinuousCoordinates
Deprecated.
-