Group Abstract Group Abstract

Message Boards Message Boards

Imaging a rotating disk with a rolling shutter

Posted 3 years ago
POSTED BY: Erik Mahieu
14 Replies

We now have a collection of creative post about “Rolling Shutter”. Here is the full current list for them:

Airplane propellers imaged with a rolling shutter
https://community.wolfram.com/groups/-/m/t/2489445

Rolling Shutter III
https://community.wolfram.com/groups/-/m/t/2543358

Modeling the Rolling Shutter Effect
https://community.wolfram.com/groups/-/m/t/2809149

POSTED BY: EDITORIAL BOARD
Posted 3 years ago

I believe there is a very minor typo: the flag should read: PlotStyle -> Texture[texture] ?

POSTED BY: c pichon
Posted 3 years ago

Thanks for pointing that out. Should be fixed now.

POSTED BY: Greg Hurst
Posted 3 years ago
POSTED BY: Brad Klee
Posted 3 years ago

I think this might just be a characteristic of plotting in the complex plane. Take a look at https://community.wolfram.com/groups/-/m/t/2543358.

In these type of plots, zeros, poles, and essential singularities are illustrated quite nicely here.

enter image description here

This particular function has a zero at the origin and an essential singularity at infinity, shown by the white arrows:

f[z_?NumericQ] := Exp[I (2.25 Im[z])] z

ComplexPlot[f[z], {z, 2}, ColorFunction -> "CyclicArg"]

The essential singularity can be seen on the Riemann sphere. Below, the south pole shows the zero at the origin and the north pole shows the essential singularity at infinity.

plot = ComplexPlot[f[Tan[Im[z]/2] Exp[I*Re[z]]], {z, -π, π + π*I}, ColorFunction -> "CyclicArg", RasterSize -> 2048];

texture = ImageResize[Cases[plot, _Image, ∞][[1]], Scaled[{1, 1/2}]];

rsphere = SphericalPlot3D[1, {u, 0, π}, {v, -π, π}, Mesh -> None, 
  TextureCoordinateFunction -> ({#5, 1 - #4} &), 
  PlotStyle -> Texture[texture], Lighting -> "Neutral", Axes -> False, 
  PlotPoints -> 100, SphericalRegion -> True
];

South pole:

Show[rsphere, ViewPoint -> {-1.3, -2.4, 2.}, ViewVertical -> {0, 0, -1}]

North pole:

Show[rsphere, ViewPoint -> {1.3, 2.4, -2.}, ViewVertical -> {0, 0, 1}]

POSTED BY: Greg Hurst
Posted 3 years ago

Thanks, Greg, for doing the Riemann sphere... a nice addition to this already colorful thread.

It's possible (probable?) that the visual similarity arises from expansions around a zero being dominated by low-order linear terms.

But what I was really hoping for may be too unrealistic--Is there a description of something like the Eisenstein series in terms of rotating propellers and sliding shutters?

POSTED BY: Brad Klee
Posted 3 years ago

Thanks equally for the suggestion.Here is Mona with two different speed ratios shutter vs image: 1.0 in the center and 2.0 at right:

enter image description here

Have fun!

POSTED BY: Erik Mahieu
Posted 3 years ago

Looks like a good entry for the "Wolfram One -liner competition"! It also solves my problem to convert any image into a "roller shutter captured" image. here is the transformation on he Wolfram logo using your code:

enter image description here

POSTED BY: Erik Mahieu

Thanks for the suggestion. You could also make a weight lifter version of the Mona Lisa (apply it on the ImageTransformation sample image) =D

You can use the following code to transform an image in one step:

ImageAdd[ImageTransformation[img, Block[{x, y}, {x, y} = #; 
    RotationTransform[(550 - y*550)*Degree, {.5, .5}][{x, y}]] &], 
 Graphics@Disk[]]

manipulate 550 for different options.

Example:

enter image description here

Posted 3 years ago
POSTED BY: Erik Mahieu
Posted 3 years ago

And here's a way to do this with a continuous color wheel. This is sort of a blend between your idea and @Henrik Schachner's posted here.

The idea is with a standard color wheel we can exploit its cyclic nature and turn rotation into scalar addition. Just add a constant to the h channel to rotate the wheel.

hsbImage = Compile[{{r, _Integer}},
  Table[{(ArcTan[r - j - .001, i - r] + π)/(2π), 1, 1}, {i, 0, 2r}, {j, 0, 2r}]
];

r = 1024;
rps = 2.25;

base = Image[hsbImage[r], ColorSpace -> "HSB"];
mask = Image[DiskMatrix[r]];

splits = ImagePartition[base, {2r + 1, 1}][[All, 1]];

transform = ImageAssemble @ Table[
  {ImageAdd[splits[[k]], Hue[rps * k/(2r + 1), 0, 0]]}, 
  {k, 2r + 1}
];

Here we do a little trickery to renormalize the hues and turn the image into a disk:

final = ColorCombine[
  {
    ImageMultiply[Mod[#1, 1], mask], 
    ImageMultiply[#2, mask], 
    #3
  }& @@ ColorSeparate[transform], 
  "HSB"
]

To add discrete sectors, like in the original post above, we can simply round:

Round[final, 1/6]

POSTED BY: Greg Hurst
Posted 3 years ago

Great idea to vary the revolutions per second!

We can think of rps as the z-axis and visualize in 3D:

propeller[θ_] := Sin[3θ + π/2];

With[{r = Sqrt[x^2 + y^2], θ = ArcTan[x, y]},
  RegionPlot3D[
    r <= propeller[θ - π*z*x],
    {x, -1, 1}, {y, -1, 1}, {z, 0, 2.25},
    Frame -> None,
    PlotPoints -> 50 (* change to 100 or 200 if you're brave *)
  ]
]

enter image description here

POSTED BY: Greg Hurst

enter image description here -- you have earned Featured Contributor Badge enter image description here Your exceptional post has been selected for our editorial column Staff Picks http://wolfr.am/StaffPicks and Your Profile is now distinguished by a Featured Contributor Badge and is displayed on the Featured Contributor Board. Thank you!

POSTED BY: EDITORIAL BOARD
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard