<img src="https://picsum.photos/id/1015/300/300" class="flower">
@property --a {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

@property --o {
  syntax: "<angle>";
  inherits: true;
  initial-value: 0deg;
}

$n: 8; /* the number of circles/petals */

.flower {
  --s: 350px; /* image size */
  --a: 28deg; /* this will control the curvature */
  
  --r: calc(var(--s)/(2 + 2/sin(90deg/#{$n})));
  width: var(--s);
  padding: calc(2.2*var(--r));
  border-radius: 50%;
  clip-path: circle(49%);
  background: linear-gradient(60deg,#2d576d,#e0236f); 
  aspect-ratio: 1;
  box-sizing: border-box;
  --R: calc(var(--r)*cos(90deg/#{$n})*(1/cos(90deg/#{$n} - var(--a)) + 1/cos(90deg/#{$n} + var(--a))));
  --g:/var(--R) var(--R) radial-gradient(50% 50%,#000 calc(100% - 1px),#0000) no-repeat;
  $m1: ();
  $m2: ();
  @for $i from 1 through $n { 
    $m1: append($m1, 
      calc(50% + (50% - var(--r)*sin(var(--a))/cos(var(--a) - 90deg/#{$n}))*cos(360deg*#{$i/$n} + var(--o))) 
      calc(50% + (50% - var(--r)*sin(var(--a))/cos(var(--a) - 90deg/#{$n}))*sin(360deg*#{$i/$n} + var(--o)))
      var(--g), 
    comma);
    $m2: append($m2, 
      calc(50% + (50% + var(--r)*sin(var(--a))/cos(var(--a) + 90deg/#{$n}))*cos((360deg*#{$i} + 180deg)/#{$n} + var(--o))) 
      calc(50% + (50% + var(--r)*sin(var(--a))/cos(var(--a) + 90deg/#{$n}))*sin((360deg*#{$i} + 180deg)/#{$n} + var(--o)))
      var(--g), 
    comma);
  }
  mask:
    #{$m1},
    radial-gradient(100% 100%,#000 calc(var(--r)/tan(90deg/#{$n})),#0000 calc(var(--r)/tan(90deg/#{$n}) + 1px)) intersect,
    radial-gradient(#000 0 0) exclude,
    #{$m2};  
  transition: --a .3s;
  cursor: pointer; 
  animation: rotate 20s infinite linear;
}
img:hover {
  --a: 10deg;
}
@keyframes rotate {
  to{--o:360deg}
}
body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-content: center;
  place-items: center;
  grid-auto-flow: column;
  background: #E0E4CC;
}
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.