As a CSS gradient is treated as an image, you can use a gradient to generate your shape, by having transparent or semi-transparent areas as part of the gradient.
In this next example, I have used generated content and floated this content, giving it a background image of a linear gradient. I am using that same value as the value of shape-outside. The linear gradient goes from purple to transparent, so by changing the value of shape-image-threshold I can decide how transparent the pixels need to be that create my shape. You can play with that value in the example below to see how the diagonal line will move across the shape depending on that value.
You could also try removing the background image completely, thus using the gradient purely to create the shape and not displaying it on the page at all.
In this next example, I am using a radial gradient with an ellipse, once again using a transparent part of the gradient to create the shape.
You can experiment directly in these live examples, to see how changing the gradient will change the path of your shape.