Turning Built-in Shapes

Posted October 10, 2018 by tbrass

I'm sure there's an easy solution to this, but some of the built-in shapes are at odd angles. For example, the car is set with its nose turned down. Is there a way to rotate the car so it isn't at this angle? I can see how to turn it right or left, but rotating forward or backward so it's level with Spaceland is alluding me.car

Suggestions?

Thanks!

Comments

Submitted by sgibbs on Wed, 10/10/2018 - 11:47 · Permalink

Hi, I'm sorry you are having trouble with your shapes.  Could you post a link to your project?  Here's a very simple one I made where the cars are parallel to the ground, so I'm wondering if there's something else in your code causing this problem.  http://www.slnova.org/GUTS/projects/618675/.  Thanks!

Submitted by ilee on Wed, 10/10/2018 - 13:23 · Permalink

Hi Tami,

Here's a fix:  try deleting the existing .slb file associated with the shape and see if that fixes it.

(Explanation: StarLogo Nova tries to read it in then forgets that it did, and applies it again -  so the rotations get screwed up.)

--Irene

Submitted by tbrass on Wed, 10/10/2018 - 13:27 · Permalink

In reply to ilee:

The shape is from the SLNova built-in shapes and is called car. Do I have access to the .slb files?

Submitted by ilee on Wed, 10/10/2018 - 13:39 · Permalink

Hmm, if it is a problem with the built in model, I cannot reproduce it.  When I load the project Su created, cars are in the proper orientation.  I guess I'd need to see the project that generated the screen image you shared in the first email.

--Irene

Submitted by tbrass on Wed, 10/10/2018 - 17:08 · Permalink

I think Sue used a lambo (car shape). I was using a shape called car.

I started going through the shapes to see why my students were frustrated. Here's the list of shapes that seemed like they would benefit from a change of orientation/rotation or had other issues. Don't get me wrong - I love additional shapes. I'd just like to know how to turn them to be more useful in a 3d environment.

  • The otter 1 is on its back.
  • The turtle is standing on its back legs.
  • The torus is on its side.
  • All the letters and numbers are laying down.
  • The coin is on its edge.
  • Phospholipid doesn't load.
  • The starch molecule is flat.
  • Platform doesn't load.
  • Wall doesn't load.
  • Acacia branch and tree don’t load.
  • Flower petal is flat.
  • California is on it’s end.
  • Capsule is on its end.
  • Car is on its end.
  • Silver coin and gold coins are flat.
  • Fireballs 4-5 are on their end.
  • The frog is sideways.
  • Frog 4 is standing on its toes.
  • Girl 2 is flat on the surface.
  • Hana is flat on the surface.
  • Lilypad was sideways.
  • Person was sideways.
  • Person 2 was on its back.
  • Sea Turtles 1 & 2  on their fins (sideways).
  • Shark (the one at the bottom of the list) is on its tail.
  • Spaceships 3 & 5 are on their sides.
  • Tuna 3 is flat on its side.

Submitted by Daniel Wendel on Fri, 10/12/2018 - 11:39 · Permalink

Hi Tami,

This is my fault - I actually didn't intend to release all of those shapes as built-ins, and you're the first one to point out my error to me! As Irene mentioned, the issue is with the ".slb" files that determine how a model is loaded. However, because they are built-in, you don't have access to those .slb files as you rightly pointed out. There's a workaround, which is to download the shape and re-upload it as an "uploaded shape", where you can control the orientation. But then everyone needs to upload their own copy, which may be more trouble than it's worth. Let me know if you'd like a quick tutorial on how to do that.

That said, there's another issue here, for example with the letters and the coin, which I did intend to be on this list of shapes. The issue is that we chose that orientation on purpose, with specific uses in mind, but our uses don't match yours. Unfortunately there is currently no way to rotate the model from the blocks in StarLogo Nova, which I can see is a big oversight!

I will work on creating a block to rotate models as needed, which I think will solve this problem and any similar ones. It will take a way before that block is released, but I see how important it is, so I'll try to fast-track it!

--Daniel

Submitted by tbrass on Fri, 10/12/2018 - 14:31 · Permalink

Daniel,

It's great to see more shapes. At my school, 6th graders start with Flower and Painted Turtles exercises, then create Paintball games that eventually turn into original games. This lays a really solid foundation for science simulations they do later. We LOVE the new SLNova. It's so much more stable and reliable.

Now that I know which shapes have which orientations, I can coach kids to make better choices. I'd love to learn more about downloading the shapes myself. A tutorial would be really helpful. I wanted to upload my own, but I didn't know file extensions that worked.

Any advice you can offer would be great.

Thanks!

Tami

Submitted by Daniel Wendel on Fri, 10/19/2018 - 13:22 · Permalink

Hi Tami,

To upload a shape, you need to have all of the relevant files in a folder, zip that folder, and upload the resulting zip file via the "upload a shape" option on the shapes block or via the "My Assets" page on the drop-down menu under My Projects. For an example of what I mean by "all of the relevant files", here is a link to the files for the "rabbit" shape:

http://web.mit.edu/djwendel/www/weblogo/shapes/animals/rabbit/

Notice that it has files ending in .obj, .mtl. and .png. The .obj file contains the "geometry" (the triangle mesh that forms the rabbit's shape), the .mtl file describes how that mesh should be filled in, and the .png is an image the .mtl file refers to when it says, essentially, "paint in this mesh by using the colors and patterns shown in this image".

Some of the folders also contain a .slb file. This is the file that messes up our import process, so if you use one of our shape folders for uploading, make sure to delete that file before zipping and uploading the folder.

Here is a link to an online folder that contains all of the SLN "built-in shapes" in a collection you can browse and download, so you can download them and re-upload in an orientation you want. You can also search other online repositories of 3D models and find things to use there as well.

http://web.mit.edu/djwendel/www/weblogo/shapes/

Does this help? Let me know if I missed anything in my explanation!

--Daniel