• Increase font size
  • Default font size
  • Decrease font size
Welcome, Guest
Username Password: Remember me

(Re: Improved Graphics) Temporary Gears Files
(1 viewing) (1) Guest
  • Page:
  • 1
  • 2

TOPIC: (Re: Improved Graphics) Temporary Gears Files

Re: (Re: Improved Graphics) Temporary Gears Files 6 years, 6 months ago #534

Wow! Thanks a lot for that. I would have struggled greatly, as I'm only just beginning
with Javascript, having spent years mainly coding/apps in V.B., and WebSite-Dev only
including relativelysimple Javascript elements. And a lot of 2D & 3D graphics for all that.

Although I am in the middle of constructing the maths-blocks for the likes of these gears,
and with varying teeth number & pitch, when finished, I would probably need some help
in converting it to Javascript, (within Qt context, which I'm even less familliar with yet).
I do understand your coding above, and wil play with that, for this, and other things.

The main complication though, is that apart from 'formulas' for symetrical objects like
these gears, I'm working on many non-symetrical shapes, to be used/called from a
repository, for importing into an existing scene as individual objects. These could
include many things, (woking on lots), like the gear-Racks, pistons, cam-lobes, valves,
cylinders, & heads with proper valve-ports, cranks, a front-on view of an electric-motor,
levers, & countless others. These would be impossible to create on-the-fly, with
formulas, so what I am using is the resultant simple Geometry-String !, which means
that they are of course pre-created.

So then I thought that if I'm going to make a repository for those, I might as well
include the gears in that as well, and just use their GeometryStrings too. Obviously
that means there will not be an infinite number of variations, but there are really only
so many gear teeth & pitch combinations wanted anyway.

Though working on the maths, here's how I've put them in the 'scene' for now!.....
Amongst many other graphics software I use, I'm creating all these objects using the
free Open-Source Vector-Graphics software called 'InkScape'. (Very powerful!!).
After some fiddly manipulations of scaling & coordinate methods & centering, I extract
the geometry string. (And now matching Physion's scaling). Until I finish some simple
script, within Physion I just create any rough triangle polygon, and paste the the new
geometry string, overwriting the old one. Instant part!

What I was anticipating doing, (especially for these non-symetrical objects at least),
to create an external applet, (the repository, including ref shape-icons), for object,
(or multiple objects) selection, and to pre-set some selected properties as well, like...
colour, z-order, collision filters etc., and then do either of two things...
1 Auto-create a simple code-snippet for importing to the scene with 'Evaluate Script',
2 To get a 'handle' from within Physion to export directly to it with the script.
In that scenario, the 'repository' applet could be made to stay on top, while running,
and even be invoked by Physion.

Till later. Thanks again.
1x1 square diag = root-2. Cube diag = root-3. Beautiful !
  • Page:
  • 1
  • 2
Moderators: Glenn555
Time to create page: 0.09 seconds