1

Is there any way, I can take an existing internet image and have Mathematica read it in, so it can be manipulated using the Manipulate function?

The image I would like to use -

https://en.wikipedia.org/wiki/Tesseract#/media/File:8-cell.gif

Failing that, as it's a fairly standard 4D shape, can this be recreated using the in built geometrical objects

Edit: Doesn't have to be using the Manipulate function - that was more my best guess.

Alexey Popkov
  • 61,809
  • 7
  • 149
  • 368
Tinsiles
  • 31
  • 4
  • 1
    Also possibly relevant: https://mathematica.stackexchange.com/questions/9580/how-to-create-this-four-dimensional-cube-animation – Anne Dec 04 '17 at 23:17
  • Remarkably similiar project! Not sure how i missed that one. Thanks! – Tinsiles Dec 05 '17 at 01:44

1 Answers1

2

To get the sequence list of individual frames:

myseq = Import["https://upload.wikimedia.org/wikipedia/commons/d/d7/8-cell.gif"]

then to show them:

ListAnimate[myseq]

and "manipulate" the scroll bar. Or if you must use Manipulate:

Manipulate[
 Show[myseq[[j]]],
 {j, 1, Length[myseq], 1}]

Note that this is a sequence of flat images, so you cannot manipulate the viewpoint, lighting, etc. For that you'll have to write code to generate the 3D form.

David G. Stork
  • 41,180
  • 3
  • 34
  • 96
  • Thanks, much appreciated, this is pretty much what I was looking for. Quick questions: 1) What is the 1 for in the {j, 1, Length...}? 2) How do i upvote your answer, doesn't seem to work for me? 3) If I did want to write the code for the 3D form, how would i start going about that? – Tinsiles Dec 05 '17 at 01:43
  • @Tinsiles: the syntax of a variable in Manipulate of {j, 1, 5} (say) would mean that you could slide to any real value in that range, e.g., 2.94. That makes no sense for a discrete, indexed set of images. If the iterator is {j, 1, 5, 1} it means that j can go between $1$ and $5$ in steps of 1. (Perhaps your reputation is too low to up-vote. When you gain more reputation points, return and up-vote. When you get even more (100?) you can click on the check mark to "accept" my answer.) – David G. Stork Dec 05 '17 at 02:45