The Leftover

Members
  • Content count

    79
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by The Leftover

  1. The Leftover

    Web Assembly

    I should not being doing this . . . but I have been experimenting with Web Assembly. With so many hexagons and so many crime incidents, Illuminated City has come computationally intensive tasks. My question is, have y'all tried to use it for some functions (e.g. ComputeNormals)? Did it perform well? Did it seem worthwhile?
  2. The Leftover

    Web Assembly

    Gentlemen, thank you for the links. Let me some opinions base on three days of work. I started writing in straight WAT. Because I have a genetic defect that causes me to do things the hard way. However, it has caused me to learn a lot of things. WebAssembly is at the "MVP" stage as they call it. One can only create a module with functions below that - two levels. One can create a list of which functions may be exported. The MVP status shows: I couldn't figure out how to make a module-global variable that was mutable; so I did a work-around. One can share a typed array between JS and WA. In WA, it is called "memory" but there may only be one of them. I redesigned things a bit so all processing was applied against one array. This could put a crimp in my style. Is it possible the "C" converter bypasses these functionality bottlenecks? It seems a little unlikely; I think wat is the textual representation of wasm and they go hand-in-hand. They do appear to be beavering away at this much as we are here. The integration makes it *NOT* an all or nothing kind of thing. When the module is built, it can receive JS functions, notably console.log. So I can log things to the console. I could make other JS calls if I wanted. Exported functions are just a function. You can call it from JS. (If you print them it says "native code", which gave me a kick.) In light of this, I am pushing forward with creating limited functions for the three or four places where Illuminated City sits for more than a second. It requires some re-organization but I have the substantial advantage of being the only author. I can also write these functions in JS. That part is really neat; the array is one array and looks the same whether the manipulation was done by JS or WA. This will be helpful for testing.
  3. The Leftover

    Illuminated City

    This is wobbling to market. Crime analysis tools: prototypes built on open data. The "strive" was for great presentation fast, slicing a lot of data in many useful ways. I started with SVG - and still use it for conventional charts. A lot of the data is presented on a map. In January, I elected to dispense with Google Maps and put the whole thing on a Babylon Canvas. I already felt late so it has been an intense period. Images are below and you can use it at https://sanfrancisco.ca.illuminated.city, https://chicago.il.illuminated.city and https://boston.ma.illuminated.city. The 3d part is called "geo-location". (You may need to sit and the landing page for a few counts before trying to navigate.) Thank you all for making Babylon. It has changed my life. Also, a shout out to JohnK for suggesting SPS, which have served me well. Comments, suggestions, conversation all welcome. Notes: ~ I applied scene.pick to allow the user to enumerate details of crimes in a specific area. ~ Chicago is mammoth, with about 400K crime records and a bazillion hexagons, but it still works Image 1: Assault and Battery in San Francisco for the past three years. Image 2: Theft from motor vehicle. Color indicates increase/decrease; elevation indicates current level
  4. The Leftover

    Illuminated City

    A couple interesting things in this video: 1) This is Los Angeles with 250K cells (probably 75K visible hex prisms in this demo). When I optimize for SPS, the performance is really pretty amazing. 2) You see the navigation inspired by Wingnut's suggestion to change focus. http://www.brianbutton.com/babylon/GeoSearch-Intro1.mp4 I did clip out some waiting periods but the video is all 1X speed.
  5. The Leftover

    Bezier Surface

    Pretty splendid!
  6. The Leftover

    Text as polygon mesh

    In Q&A, I had looked for help building a utility to dynamically generate polygon meshes in the form of text. Got some advice. Thank you Gijs. Here is a rough cut after a few more hours on it. https://www.babylonjs-playground.com/#PTTMVI#67 It seems that this can be done as a general tool with colors, sizes and multiple fonts -- not to mention a full alphabet. I need this for my own purposes. Not sure whether there is other demand for this. Comments solicited.
  7. The Leftover

    Text as polygon mesh

    When you have a hammer, problems look like nails. I would like users to be able to move the Arc Rotate Camera focal point to different spots around the city. To help communicate that, I needed a "focal point marker" to show the current point on the map. I picked an anchor. (Anyone with a better idea is hereby given the mic.) Constructing a 3D anchor from an SVG rendering of an anchor turned out to be essentially the same exercise as creating a letter. So, in a repetition of history, I created a new font family called "WebGL Dings" https://www.babylonjs-playground.com/#PL752W#17
  8. The Leftover

    Real-time 3D flight display

    Last week, I discovered that real-time aircraft flight data is available through an open API. Two, in fact. Already having a city, I decided show overflights. I put in a five-minute delay to permit me to smooth the data but this is almost real-time. Video shows FedeX coming into SFO over San Francisco. This is not very zoomy but it feels signficant. I am not entirely sure what to do with it. http://www.brianbutton.com/babylon/MonoPlane.mp4 Airplane model was built out of cardboard, dowels, plywood and rubber bands. https://www.babylonjs-playground.com/#H3Z6J1#7
  9. The Leftover

    Text as polygon mesh

    Updates: More glyphs, including some non-English letters (e.g. ñ). https://www.babylonjs-playground.com/#PL752W#6 meshwriter.min.js size is below 100K. I will try to keep it there but we will see. In review, fonts are: ~ Helvetica: Default, efficient and most glyphs. Use this one ~ HirukoPro: 'cause I use it ~ Comic: just a couple letters right now ~ Jura: I like it for numbers
  10. The Leftover

    Text as polygon mesh

    Wow!
  11. The Leftover

    Marking questions as solved

    Can we pin that GIF to the top of this board or something? It is sortof a community thing. If most people start using it, others will too.
  12. The Leftover

    Text as polygon mesh

    I think you and I have pegged the needle on opposite sides of the creativity scale. I might steal. Illuminated Cities are a rectangle floating on sky-texture. Everything goes on the rectangle for now . . . except when I did this, (http://www.illuminated.city/mp4/BurglaryCategory.mp4) I rotated the date numbers for y'all to see them. For me, a radical departure. It then occurred the me that the "low wall" around the city rectangle could hold useful information. I don't think I will try a circle but I am keeping it in mind. In other news, Helvetica does not yet support single and double quote but I will add them.
  13. The Leftover

    Illuminated City

    The data is actually official city data -- many cities offer is as part of an open data trend. We work with San Francisco, Chicago, Los Angeles and Boston. This only looks at where and when. There are absolutely other correlations to be made. For example, February is always the lowest crime month in Chicago, by a consistent percentage. I don't look at stadium events, national holidays or anything else. I can see many other trends when I am fiddling around. For example, theft from auto is geographically concentrated but auto theft is not. Violent (assault) has strong place and time patterns. Burglary also has patterns but less pronounced.
  14. The Leftover

    Illuminated City

    After months of painful number-crunching, I have built a demo of something that shows the trend associated with crimes. There is a theory that some crime-types have micro-geographic behavior -- and staying on top of those trends can help target police patrols. This is a rendering of burglaries in part of San Francisco for about a year. Red is rising, green is falling, blue is neither. The elevation indicates the frequency of burglaries with some geographic weighting. http://www.illuminated.city/mp4/BurglaryCategory.mp4 The video clip is running at 3X so the visualization is rendering pretty fast. I cannot do a whole city at once.
  15. The Leftover

    Illuminated City

    I was struggling with how to provide camera views optimal to people interested in different parts of the city. A lot of times responsibility is parceled out with a bit of geography, e.g. a police district. Wingnut gave me a clue having to do with changing the target of the arc-rotate camera. I like the results. Check it out. http://www.illuminated.city/mp4/DistrictZoom.mp4
  16. The Leftover

    Text as polygon mesh

    Thank you for the helpful comments. I went with MeshWriter; this was partially influenced by your constant use of "mesh" in the name -- which is appropriate. 'text' means too many other things in the context, most of them not similar to this. 'glyph' is more on-point but is intimidating and hard-to-spell. BTW, TextMesh sounds like TexMex when you are quite drunk.
  17. The Leftover

    Text as polygon mesh

    Train? I was thinking of maybe a segmented worm having convulsions. (Or maybe a clump of balloons with excessively high static charge.) You gotta admit the basic framework is some creepy alien planet. I am going with the worm . . . This week, I should figure out how to create documentation for MeshWriter (the final name). I may want to tap you for a simple sweet playground showing a conceivably useful application. (My only application, until yesterday was labeling pieces of real-estate.)
  18. The Leftover

    Text as polygon mesh

    Holeee Sheeeit! May I suggest you switch from type.min.js to meshwriter.min.js? This is the newer version and, as promised, each individual letter origin is the calculated letter-center. http://playground.babylonjs.com/#1KPF49#26
  19. The Leftover

    Text as polygon mesh

    Wingnut, I do humor on Internet (because I cannot resist) but I miss a *lot*. Or that is what I suspect. Hard to know for sure. It's a tough medium for humor and, separately, for humorists. There are not many cues going either direction.
  20. The Leftover

    Text as polygon mesh

    Ha ha haha!!! Well, I do step away from the computer from time to time. I just finished a hike in the hills (you would call them mountains). Stand by for possible rejoinders after dinner. Or maybe tomorrow after coffee . . .
  21. The Leftover

    Text as polygon mesh

    Deltakosh, I am up for that. What is the next step? I don't seem to have authorization to make a branch or push on the Extensions repo. See my note.
  22. The Leftover

    Text as polygon mesh

    This is why nobody wants to ask for customer input. 😎 Moving right along . . . I am speechless.
  23. The Leftover

    Text as polygon mesh

    Wingnut and Jerome, plus any others: Survey question on Babylon Text. Right now each letter mesh is relative to the "origin" as defined by the font. See the red star. Actually, it is relative to the "origin" of the first letter in the string. So I am thinking of changing it so that each letter mesh is relative to its own origin. The text string will not appear any different but people like Wingnut who wish to do special effects may find the meshes easier to manipulate. The only other sensible option to consider is to define the mesh relative to the "center" of the letter. This will take a bit longer and is not "text-like", although it might be similar to other particle types. For example, the vertical origin will bounce up and down as a function of the height of the individual letters. I am OK with either approach but do not plan on doing this twice. Again, the generated string will look and behave the same as it does today.
  24. The Leftover

    Material for SPS

    Thank you. "Baking" was the best approach for me. Glad I asked.
  25. The Leftover

    Material for SPS

    When I create a hexagonal prism for SPS, it does not seem to recognize the rotation. I have been rotating the particles en masse after creation, but I gotta believe I am just doing it wrong. https://www.babylonjs-playground.com/#YI6D05#2 The "shapes" have no color. The particles are colored. To save memory, I must have "updatable" set to false. This makes my work-around harder. Advice requested.