Animation view in Dymola doesn't show pictures - modelica

I am working on a Modelica mechanical model which includes Modelica.Mechanics.MultiBody.Visualizers.FixedShape build animation, but when using this component in a trivial model, there is nothing in the animation view, but when using it in a complicated model, the animation view works fine.
The following screenshots are based on the example from Claytex blog, the model could be downloaded from this link here
My question is why the animation view doesn't show the picture in the trivial model?

Posting as an answer, as pictures are not possible in comments:
For me, the dice is visible simulating "JustImage" using Dymola 2021/2021x. It is just pretty small and in the origin. If the view isn't rotated it hides behind the axis arrowhead...

Related

flashes of previous SceneKit content

My app alternates "pages" of SceneKit content with images and text. When I advance from an image page to a new SceneKit page, the content from the previous SceneKit page is briefly displayed before being replaced by the new content. Funky.
I'm only using one SCNScene and one SCNView. When I transition to an image type page, I hide the SCNView. To reinstate a new SceneKit display I:
remove all nodes from the rootNode
load new node graphs from file
add the new node graphs to the rootNode
unhide the SCNView
Evidently the unhiding is asynchronous and I'm seeing the remnants of the earlier scene while the new one is establishing. I'm having a similar issue with AVPlayer as well.
In past apps I experienced this same issue with MPMoviePlayer and delt with it by displaying a blank view over the movie view and then hiding that on notification that the current movie had loaded. Perhaps I can deal with the AVPlayer issue in the same manner but I don't see this applying to SceneKit. Even in the case of AVPlayer I'd like a better way of dealing with the issue if possible.
edit_1: I've tried Hal's idea of swapping out SCNScenes but still get the momentary residual image. I've tried using two SCNViews and alternately swapping them out. I've also tried moving the camera past visible elements before exiting the current scene. The prepareObjects:withCompletion handler did nothing.
It appears that it's not the nodes nor the SCNScene that is persisting but a rendered image of the scene. This is also supported by witnessing this effect with movie players as mentioned above.
edit_2: I tried a mask but like all other attempts it fails. I did have "success" with using an SCNAction to move the camera offscreen plus a completion handler to effect changes only after. However, this extends the load time by about 800%! Better to have the ugly "flash".
I've got something that works but I'm skeptical. I've created a "nullCamera", one that points to an empty field of view. Before switching out my scenes I assign that camera to the SCNView. When the new scene loads the principal camera is re-assigned. But I'm nervous about this approach.
I tried this before and it didn't work. It now works because I moved the code upstream (instead of where it seems to belong). But the interveining code has nothing to do with SceneKit. It merely parses data for strings, sets color prefs and displays a title in a label. So I'm worried that it's only about timing and I may see the issue again on, say, a faster device. Maybe writing the title to a view element forces a re-display of the SCNView too? (Which I couldn't seem to effect with code.)

How do I make animations in an iPad app?

I'm developing an application for iPad.
I want to make nice animations so that I can beautify my application.
For example, there are 4 main buttons/images in a view.
When tapping on one of them, a few more buttons/images will branch out.
It's like the 'parent button' will branch out to few 'child buttons'.
How are these kind of animations done?
Are there any good references or code snippets to refer to?
Thanks.
A good stating point would be the Core Animation demo's here:
https://github.com/neror/CA360
Run them in the iOS Simulator and checkout the code that creates the magic.
UIView animations would also be suitable for your example, and are a little easier to implement. There is a nice tutorial here:
http://www.raywenderlich.com/2454/how-to-use-uiview-animation-tutorial
Search on the term "Core Animation iOS" on your favorite search engine. You'll find information from Apple's Developer Central site, particularly the Core Animation Guide and Cookbook.
There are actually 2 main methods.
One is to use Core Animation, if it contains your desired path and animation.
The other is to use an animation game loop, where the app periodically calls a routine to redraw the view every frame time. An NSTimer or CADisplayLink can periodically (say at 24 or 30 or 60 Hz) call a routine doing a setNeedsDisplay, which then causes the view's drawRect to be called, etc. The some other periodic code can change some state (moving some X Y button positions, etc.) during or between each frame to provide the appearance of movement or other animation effect, when the view is redrawn. Or OpenGL can be used to redraw some animated 3D world as things move. You can even have each frame change in response to user input. This is the most flexible way to animate, and allows you to customize animations in ways that are impossible for Core Animation, but it uses more power and can be so CPU intensive as to be a lot slower than Core Animation as well.

iPhone Word Game like Scrabble / Wordfued / Rummi

I am in process of creating a multiplayer game similar to the Scrabble / Wordfued / Rummi. I am trying to see what would be best way go about implementing the UI and their interactions.
I would be having a framework which would keep track of all the pieces on the board and the AI for knowing if it is a valid move.
I am trying to figure out what could be best solution to handle the UI part. The game board would be larger than would the current iPhone screen could support. So the board would have an effect of a scroll view. The same goes for the game tiles using which user can play. These are not fixed amount of tiles/cards and the same could be more in numbers which would also need another scroll view kind of effect.
There would be many more effect's were the user can move a complete set of tiles/cards from the board and place it in another location of the board. Or even a tile in between the set of tiles on the board.
So I am trying so see if I should go with two scroll view provided by iOS and handle all the detaching the tile/card from one scroll view and placing the same in GameBoard scroll view
Or
Should I go with something like cocos-2d which provides more advance game UI handling capabilities.
Please do let me know your thoughts and feedback on what could be the best choice for the same. Thanks in advance for all your help.
Words With Friends uses native UIKit views. It is quite simple and uses a transition to move between the two degrees of magnification (close up and not close up).
You can do everything quickly in UIKit with a UIScrollview. You can use drag events to move tiles around the screen, even changing their perspective/look during dragging. Using UIAnimation would allow you to do simple frame based animation for things like dropping a tile.
Cocos2d will be quicker if you already know a similar gaming library. However if you choose it you you'll miss out on using Interface Builder and a lot of conveniences in UIKit.
If you're starting from a base of zero with either approach, then only use Cocos2d if you want particle effects (like stars and sparkles, UIKit has nothing for this).
Otherwise I'd say try UIKit, it's easier and there are more resources on the web.

haw to create slideshow 3d

i have a view and i want when i change the orientation this view a slideshow appear
how is called this function and how to do this kind of thing...?
Look Here:
Quartz Composer 3D Carousel (and loading images within an iterator)
This is a tutorial about how to make something very similar to your example. You may have to either adjust the tutorial code or your own code to make them fit together.
Edit: Just realised the link to the tutorial in that article is broken.
You may have more success creating something like this and adapting it.

Elements/Wired Style 3D Animation

I am trying to implement the style of 3D rotational animation you see in the Elements and the Wired iPad applications. The animation has the UIScrollView style acceleration so it looks like they have connected a UIScrollView to a sequence of images.
I have tried implementing it in UIKit, using an "empty" UIScrollView to increment through an array of images and set the contents of a UIImageView, based on the content offset. This works but even with scaled down images on the simulator, it is very sluggish. I am not sure how I could optimise it to make it run faster.
Source Code on GitHub
I have also tried doing something similar in Cocos2D. Cocos could animate the sequence very smoothly but I couldn't control the animation. I tried using a scroll view and setDisplayFrame to step through an animation but it didn't work.
Any help or suggestions on either option would be greatly appreciated.
I'm not 100% sure I understand the effect you're trying to achieve, but if you're referring to the images in "The Elements" app which you can spin around, then yeah, you probably don't want to be doing that with an UIScrollView.
You can control the animation of content in Cocos2d. While you can set an animation to "just run", you can also manually set frames directly out of an animation, so if you can get smooth animation out of Cocos, you should be able to do it interactively. Look at the atlas sprite object - you can set the rect of an animation frame directly.
However, again, I'm not sure this is the best approach, either, since that's a lot of frames for a texture. If you're going to be doing a lot of 3D photographic objects, you might consider looking into the video codecs and scrubbing along a video instead of trying to pack all the frames of a rotation animation into a series of textures.
Just so you know, the guy who made "The Elements" wrote an article about the development of the app, and here's what he had to say about the 3D rotatable objects:
"Creating fluidly spinning objects with the level of crystal clear photographic quality I demanded is actually harder than it might seem. A number of the obvious things the more technical of you might think of turn out not to work for reasons too complicated to get into here. Suffice to say that John designed a brilliant solution that uses the iPad's excellent graphics subsystem to lend a hand in ways it's not normally intended to."
I don't know how exactly they achieved the 3D objects, but perhaps that "uses the iPad's excellent graphics subsystem" mention gives you a clue where to head from here...