New Codea demo - meshes

We are trying to improve on the demos that come with Codea, and all comments and suggestions are welcome.

I’ve made a new demo which is all about meshes, which you can find here.

So if you are fairly new, and haven’t used meshes yet, we’d like you to try it, and tell us what you think is good, unclear, missing, etc.

Important! - when pasting into Codea, keep pressing on the “Add New Project” button until you get the option to paste into a new project. Then Codea will split the code correctly into tabs.

Hmm. Unlike other times when I’ve gone to git, I can’t seem to select any of the text on the linked page.

Are you using the in-app Codea Talk button? You should see a COPY link right at the top of the page (sometimes, with certain gists I don’t see the COPY link. I’m not sure why. I’m seeing it for this one though)

@ignatz i think the demo is very nice. I found it strange that the name of the last example is ‘curves’ when it is a 3d block.

This is very helpful. I appreciate the break down in short examples that form a complete tutorial. This works well for me also as a reference. In my opinion you can elaborate and give some subjects their own snippet of example code.

  • Like the translate functions. They are only mentioned in a side note here.

  • how to draw polygons. ( maybe with the triangulate function?)

  • the last example about the 3D box is titled curves. How about an actual curve example?

Thanks for the comments, I’ll modify the demo

I’ve updated it, here.

I’ve added a new demo for translate/rotate, which also uses triangulate to draw a circle (so I handled all these things in one demo)

If you run it, you will see something AMAZING. Run the new demo (number 9) and turn on the ShowTriangle option, which colours each of the triangles in the mesh a different colour. (I did this to show what the triangulate function did).

I thought the triangulate function added a point in the middle and connected all the other points to it. Wrong!

Now increase the number of points and look at the crazy results!

@Ignatz See the code I wrote in Dec 2013 at the link below. I think there’s plenty of examples already written in the forum, the new coders just need to make an effort and find things.

http://www.codea.io/talk/discussion/646/large-circle-ellipse-renders-slowly

EDIT: Maybe what we need is a sticky note at the top of the forum with different categories. Then anybody can look thru the forum and when they find something they think is interesting that fits into a catagory, add that link to the sticky note.

@dave1707 - no I don’t think a jumbled collection of different code efforts is going to make things easier for new users. As an example, just have a look at the wiki page and tell me whether you think that is well organized. It is a mess of wildly varying quality and not well organized.

A coherent set of demos is much more useful, especially when built right into Codea.

I’m not saying what I’ve done is perfect by any means, but I’m trying to improve on what we have already.

@Ignatz I’m not trying to replace the demos or what you’re trying to do with new ones. I’m just saying it might be useful to have some sort of place where anyone can go if the want to find examples/information for tweens, meshes, physics, etc. There are plenty of examples already written on the forum, from easy to complex. There’s just no easy way to find them. They could select a link and see/read what’s there. If it’s too complex, select another link in the list until they find what suits them. It’s just that there’s so much information going to waste. This way, everyone could participate in adding to the list by looking thru the forum and doing a copy/paste of the link into a catagory. New links could be added by whoever posts new example code. Theres 128 pages with 50 discussions per page and probably a lot of people don’t look beyond the first few pages.

I agree that too much good stuff gets lost.

That’s what the wiki is for, isn’t it?

But allowing anyone to edit it results in a mess, as has happened several times in the past.

It really needs an editor (care to volunteer?) :wink:

I was thinking of a discussion that’s stuck at the top of the forum. Anyone could paste a link to it, but only the mods could delete something from it. There wouldn’t be anything in it except catagory headings and links to a discussion. A link could be in multiple categories if appropriate.

The problem is that unmoderated material quickly gets in a tangle. Complex code will be jumbled with basic code, rather than being in a coherent order. Newbies will post messy code and get upset if it’s removed. Also, if someone goes feral, as has happened in the past, and messes up this thread, there is no way to recover the previous version, i.e. no restore option, so an open access discussion thread is not a good place to keep the material. (The wiki has the same problem, being open to all).

It’s much better if someone experienced curates the material, and if access is controlled. So I would allow mod access and also have a mod manage it.

I guess I was looking at the good points, not the bad.

I’ve had to clean up the wiki a couple of times, that’s why I was looking at the downsides!

You would make a great curator. How about it?

@Ignatz good job on the demo! I really benefit from the demos and books you provide. :-bd
The triangulate sample is surprising. Makes you wonder if it is possible to predict or influence the way it breaks down the polygon in triangles.