How to create new demon.model in openGLES? - iphone

I want to create a rotating object with 3d effect , I am using the sample project iPhoneGLEssentials provided by developer.apple.com. In the sample project demon.model file is used , I need to create my own .model file. Can any one help me how to create the required .model file?

You can see from the source for that demo that's not a common format. It just has the arrays for positions, normals, texcoords and element indices. You can see how it is read from the .model file in the moduleUtil.h. You can search online for libraries that can load specific formats for models. Engines like irrlicht has support for many formats such as .3ds, and .x. You can start from checking there.

Related

How to use Transfer Learning for Text classification in Apples Create ML?

I was watching https://developer.apple.com/videos/play/wwdc2019/428/, where Transfer Learning is used for text classification in Create ML.
I wanted to do the same and created Datasets with the following structure:
Folders where the Name of the Folder is the Label / Answer to a Question.
Inside each folder there are 10 text files with Questions.
Pretty much the same Idea like in the Video.
When I now choose Transfer Learning (like in the Video) and start to train, the Window tells me "Model has no Data" (see Screenshot).
Error Screenshot
What I am doing wrong ?
By looking at your Error Screenshot, you are missing the test data.

How can I create in Gehpi directed tree graph instead of sphererical

I want to make a network graph which shows the distribution of our documents in our folder structure.
I have the nodefile, edgefile and gephi graph file in this location:
https://1drv.ms/f/s!AuVfRBdVHkO7hgs5K9r9f7jBBAUH
What I do is:
Run the algorithm ForceAtlas2 with scaling 10-20, dissuade hub marked and prevent overlap marked, all other standard setting.
What I get is a graph with groups radial/spherical distributed. However, what I want is a tree directed network graph.
Anyone know how I can adjust Gephi to make this?
Thanks!
I just found a solution.
I tested the file format as shown on the Yed site "import excel file" page
http://yed.yworks.com/support/manual/import_excel.html
This gave me the Yed import dialog (took a life time to figure out that it's a pop up menu and not selectable through the standard menu)
Anyway, it worked and I've adjusted the test files with the data prepared for the Gehpi. This was pretty easy, I could used the source target ID's etc. Just copy paste.
I load it into Yed and used some directed and radial clustering algorithms on it. Works fine!
Below you can find the excel node/edge file used to import in Yed and the graph file you can open with Yed to see the final radial result.
https://1drv.ms/f/s!AuVfRBdVHkO7hg6DExK_eVkm5_mR
Only thing to figure out is how to combine the weight (which represents the number of documents) with the node size.
Unfortunately, as of version 0.9.0, Gephi no longer supports hierarchical graphs. Maybe try using a previous version?
Other alternatives involve more complex software, such as Graphviz, but you need a .dot file instead of your .csv. I looked all over, but could not find an easy-to-use csv to dot converter.
You could try looking at d3-hierarchy, a node.js program, but then again you need to use the not-so-user-friendly npm. If you look at the link, it looks like it can produce the kind of diagram you're looking for.

When should I use poppler_page_render vs poppler_page_render_for_printing?

There are two functions to render a PopplerPage on a cairo surface: poppler_page_render and poppler_page_render_for_printing. The documentation states that the latter should be used "to render a page that will be printed".
My question is: which one of these should I use if my cairo surface will be later saved as a (pdf) file? Does saving as a file constitute a poppler "printing"? I would appreciate a reference to documentation.
Does it matter that the PopplerPage was created from a pdf file by poppler_document_get_page?
Looking at poppler's source code, the difference is, for example, that annotations are displayed, but not printed:
http://sources.debian.net/src/poppler/0.44.0-3/glib/poppler-page.cc/?hl=362#L362
http://sources.debian.net/src/poppler/0.44.0-3/glib/poppler-page.cc/?hl=309#L309

How can I parse *.vector.pbf about Mapbox vector tile map?

*.pbf("Protocolbuffer Binary Format") is primarily intended as an alternative to the XML format.
There are two formats of *.osm.pbf and *.vector.pbf. What tools can I use to open these files? (I know JOSM can open *.osm.pbf files, but it can't open *.vector.pbf files.)
If I want to write own *.vector.pbf files in Mapbox, how do I work for that?
Thanks!
Regarding question #2, extracting PBF data
Using GDAL's ogr2ogr is the easiest method (I found).
Given a file named 1583.vector.pbf decode it to a, for example, shapefile (folder) named output:
# cmd show prog. output format output name input name
ogr2ogr -progress -f "ESRI Shapefile" output 1583.vector.pbf
Regarding question #3, creating PBF data
Use the same command as above but swap the input/outputs and output format:
# example source: https://gdal.org/drivers/vector/mvt.html
ogr2ogr -f MVT mytileset source.gpkg -dsco MAXZOOM=10
The Vector tiles used by Mapbox are serialized as Protocol Buffers.
Protocol Buffers allow you to efficiently compress the vector data inside the tile.
The Mapbox Tile Specification is available on github.
Esri has also adopted the same specification for their products.
You can find a list of parsers, renderers & CLI utilities here: https://github.com/mapbox/awesome-vector-tiles
In the common scenario, you can use mapbox-gl-js to render the vector tiles on the client. To generate vector tiles, you can use Mapbox Studio. This will require uploading your data online in the Studio. You can also use Mapbox Studio Classic (the older version) to generate the tiles locally.
Internally, Mapbox Studio uses the tilelive API, so you can programatically generate the tiles. In the list above there are other good alternatives as well.

TIFF annotation coordinates

I need help trying to find a utility or method to search for annotations (filled rectangles) in tiff files and determine their coordinates. I'm not a programmer, but I'm profficient with vbscript and powershell....any suggestions would be greatly appreciated.
I'm not very familiar with the TIFF specification as you can probably tell....i've downloaded the specs from adobe, but can't make heads or tails of what i need.
i have looked at the following related post:
Tiff annotations
it suggested looking at:
http://web.archive.org/web/20030124024322/http://www5.eistream.com/support_pro/faqs/annospec.htm
which says that annotations are referenced in tag 32932....however, i've used libtiff.org's tiffinfo.exe to view the tags associated with a test file (that has an annotation).....it does not show tag 32932.
so that's where I'm at. again thanks in advance.