Alternatively you could use a cube map with a sky texture instead of using perlin noise. And I also think that will make your scene look better due to having more detail and variation in the environment mapping. That's exactly what I did when I implemented my raytracer.
Another reason I recommend this, is that the environment does not need to be only clouds. It can have mountains, it can be an indoor scene, can be a scene from mars. Using a cube map the only thing you need to do is swap the texture and you're done.
So the first step will be to find a cube map that fits your needs. It could be stored as six separate textures, or as a single texture like the one below. Also check this link for more info on how to create your own:
Then on your code, I'd recommend creating a
CubeMap class to encapsulate the sampling calculations. This class should know how to load the cube map texture, and given a ray it should be able to know in which face and in what position to sample. In my implementation I found it easier to store each of the six faces in separate texture objects, and branch based on the direction of the ray:
public void Load(string path);
public Color GetSample(Ray ray);
private Texture faces;
In case you don't have a
Texture class yet, just create your own. It can be as simple as a two dimensional array of colors. So, just as a reference, and with no guarantee on the efficiency or soundness of this implementation, here's the code I used on my project - CubeMap and CubeFace.