I am new to JavaFX. I was trying to carry out a graphical implementation of an Ant Colony Optimization Algorithm. My version is very simple and involves ants moving in a 2D Cartesian plane, depositing pheromones if and when they find food.
I have written some code in JavaFX which creates a circular node representing the ant and moves it about on the scene of the stage and I think I'll be able to extend this to multiple ants too.
But I want to know how to color the line joining the ant's current position and it's previous position. Basically when the ant finds food and starts returning to the colony, it has to deposit some pheromone along its path and I want this path to be colored as the ant moves along it. Also the pheromone is supposed to evaporate with time. I have an array that stores this value of pheromone strength. So is it further possible to reduce the hue of the color of the line in proportion with the number(pheromone value)?
Thanks.