Jump to content
THIS IS THE TEST SITE OF EUROBRICKS!
THIS IS THE TEST SITE OF EUROBRICKS!

Featured Replies

Posted

I found myself needing utility like that recently, so I made one:

http://studs.sariel.pl/

Please note that the results are shown with 0.001 accuracy and the last digit is rounded. I'm open to new units suggestions. No, hamsters don't qualify, their shape and size are too inconstant.

Sariel, very useful and thank you for creating, but

I get:

12 inches = 0.99 feet

1 foot = 12.115 inches

1 inch = 2.539 cm

I haven't checked the others

  • Author

I get:

12 inches = 0.99 feet

1 foot = 12.115 inches

1 inch = 2.539 cm

Well, I need to do something about the rounding. The converter actually calculates everything twice, first the value you enter is converted to studs, then all other units are calculated from studs. Perhaps not the best solution.

Edited by Sariel

Well, I need to do something about the rounding. The converter actually calculates everything twice, first the value you enter is converted to studs, then all other units are calculated from studs. Perhaps not the best solution.

Well, I don't think this tool is going to be used by NASA to calculate the footprint for the next Mars lander. The level of accuracy the tool provides seems entirely reasonable for designing scale LEGO models.

  • Author

Well, I don't think this tool is going to be used by NASA to calculate the footprint for the next Mars lander.

Aaaaaand there go my dreams ;)

I did some inch/foot corrections and enabled entering dots into values. Any script that has you looking up ASCII tables is a fun script ;)

Edited by Sariel

Well, I don't think this tool is going to be used by NASA to calculate the footprint for the next Mars lander. The level of accuracy the tool provides seems entirely reasonable for designing scale LEGO models.

Perhaps they should use it for that - it's been an issue for NASA before.

Well, I need to do something about the rounding. The converter actually calculates everything twice, first the value you enter is converted to studs, then all other units are calculated from studs. Perhaps not the best solution.

If rounding is a problem, then perhaps you could use some really small unit as your base, instead of studs. Something like LDU perhaps. Come to think of it, LDU might be a good unit to add.

  • Author

Good idea, I have updated the converter to operate on LDUs, and added results in LDUs and in stacked plates. I have also rewritten formulas for units, they seem accurate now.

If you are interested, my formulas for calculating LDUs into different units are below, perhaps you can come up with better ones. So, if 1 LDU = 1/20 of a stud, then:

1 stud = 20 * LDU

1 cm = 25 * LDU

1 m = 2500 * LDU

1 inch = 25 * 2.54 * LDU

1 feet = 25 * 30.48 * LDU

1 brick = 24 * LDU

1 plate = 8 * LDU

1 small track link = 20 * 13/15 * LDU

1 large track link = 20 * 13/8 * LDU

It would be great to be able to enter how many feet = how many studs so you can then scale the rest of your model. For example I build 7 and 8 wide trains to match 8 to 10 feet wide in real life. so using that measurement I then calculate the length etc. Just an idea to make your great tool even better

Good idea

Glad to be of service!

Now, it's only because you said

perhaps you can come up with better ones

that I'm mentioning this, but you might want to re-write your code so that you only have to do one operation per conversion. For example, your conversion from LDU to either of the track links currently uses three operations, but only the LDU value ever changes, so you could do the computation for the conversion factor only once, instead of every time. For the small track link, then, this would reduce to 17.33 or, if you don't want to limit your precision you could use 52/3. That said, the performance gain you'd get would be immeasurably small, so there's probably little point, other than neater code.

I'd also redo the conversion factors for the imperial units. In your Inch conversion you are using the approximation for LDU-to-cm, and the approximation for cm-inch. It could be that the inaccuracies for the two approximations cancel each other out, but it could also be that they make each other worse. In the LDraw spec the approximation is 1 inch = 64 LDU, whereas 25*2.54 = 63.5 (over a foot that adds up to 6 LDU discrepancy - almost a whole plate thickness). This one is a little more insidious, but in the grand scheme of things probably isn't going to cause anyone too much grief.

Feel free to ignore either or both suggestion.

Owen.

  • Author

Captainowie, thanks for ideas, I need to wrap my mind around these :)

Update: the converter now shows scaled results for a specified scale (right column). The scaled results are updated whenever you change any value in the left column, or the scale factor. On the funny side, it's not possible to change value of the scaled results :P

Also, using backspace in the inputs is now possible.

Please note that due to rounding, the scaled results may not be fully accurate for scales smaller than 1:999.

Edited by Sariel

For train fans, how about adding straight tracks, it would make planning layouts so much easier.

  • 2 weeks later...

Captainowie, thanks for ideas, I need to wrap my mind around these :)

No problem. If anything needs further explanation, feel free to PM me.

On my android phone I'm using ConvertPad application. It has a user defined conversions. I will try to implement some of LEGO calculations.

Maybe they can offer it as a standard in near future ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

Recently Browsing 0

  • No registered users viewing this page.
Sponsored Links