Actually, as I think more about your script, I guess modifying the waveguide edge and the path length are kind of one in the same thing . Essentially I only need to modify your script by putting the top and bottom waves (which define the top and bottom edges) out of phase by 90 degrees from each other, then it would create a uniform line width which follows a sinusoidal path. I could analytically derive the path length from there. However, I couldn’t find the function to obtain path length in general. Thanks again.