jerome Posted October 8, 2015 Share Posted October 8, 2015 Hi, I'm about to add a 2 LOC new feature to the Sphere mesh.This would allow to create only parts of a sphere, say 30% of its height and 75% of its circumference The call would be as simple as :var sphere = BABYLON.Mesh.CreateSphere("sp", {angleRateZ: 0.3, angleRateY: 0.75}, scene);I just got the names from the variables in the code, but they may not be pertinent : angleRateZ for instance gives the rate of the sphere height and angleRateY the rate gives the rate of the circumference. So please, lovely users and native english speakers, let me know quickly what names would be the best for this powerful (but cheap in terms of LOC) feature adam and Jaskar 2 Quote Link to comment Share on other sites More sharing options...
jerome Posted October 8, 2015 Author Share Posted October 8, 2015 Obviously, both parameters will be optionaland we could use only one also Quote Link to comment Share on other sites More sharing options...
jerome Posted October 8, 2015 Author Share Posted October 8, 2015 and this should work with any other mesh built by rotation around an axis like the cylinder, the tube or the lathe (for the circumference ratio part), so the name should be pertinent for all Quote Link to comment Share on other sites More sharing options...
adam Posted October 8, 2015 Share Posted October 8, 2015 It might be more clear if you used the term "wedge" somehow: https://www.google.com/search?q=wedge+of+a+sphere&espv=2&biw=1920&bih=1075&tbm=isch&tbo=u&source=univ&sa=X&ved=0CDQQsARqFQoTCKe3otqPs8gCFUIWHgodufIHtw removeWedgeAng? cutoutWedgeAng? minusWedgeAng? subtractWedgeAng? Quote Link to comment Share on other sites More sharing options...
jerome Posted October 8, 2015 Author Share Posted October 8, 2015 I didn't even know this word (well, I know just 60 english words, I guess, and I just pretend to make sentences aarf) So "wedges" seem good.Do they fit a cylinder or a tube also ?How would you say for Y and Z ? What about "sectors" else ? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 8, 2015 Share Posted October 8, 2015 I have no fraking idea I'm cool with whatever works for english speaking people Quote Link to comment Share on other sites More sharing options...
jerome Posted October 8, 2015 Author Share Posted October 8, 2015 typical case : more work to name things than to code them ! I just multiply each ratio parameter by the variable angle (PI or 2 * PI) in the code ... Quote Link to comment Share on other sites More sharing options...
adam Posted October 8, 2015 Share Posted October 8, 2015 Looks like wedge is different for cylinders: http://mathworld.wolfram.com/CylindricalWedge.html Sector sounds good for cylinder though. Quote Link to comment Share on other sites More sharing options...
jerome Posted October 8, 2015 Author Share Posted October 8, 2015 According to what I can read on the Web so far, "sectors" seem to be the more versatile. If any better suggestion, I'll fix the code with "sectors" tomorrow ... Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 8, 2015 Share Posted October 8, 2015 A part of a circumference is an arc so arc:0.75 for a cylinder and sphere would mean 75% of the circumference of the circles perpendicular to the "length" axis. Finding a word for the percentage of height is a bit more difficult as height is already used height_prcnt is a possibility. will think some more. Quote Link to comment Share on other sites More sharing options...
adam Posted October 8, 2015 Share Posted October 8, 2015 Maybe truncate? Quote Link to comment Share on other sites More sharing options...
adam Posted October 8, 2015 Share Posted October 8, 2015 or cap? https://en.wikipedia.org/wiki/Spherical_cap capHeight? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted October 8, 2015 Share Posted October 8, 2015 I would suggest hemisphereHeight and sliceCircumference (and this would be in adequation with some 3D modelers which talk in terms of hemisphere and slicing) Quote Link to comment Share on other sites More sharing options...
jerome Posted October 8, 2015 Author Share Posted October 8, 2015 they are more (or less) than caps and "cap" is used elsewhere for ... caps ! I really like "arc" which seems the more accurate. Maybe could we say arcY and arcZ, meaning the axis ? "slices" are nice also Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 8, 2015 Share Posted October 8, 2015 Portion could work portion:0.5, arc:0.75. ????? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted October 8, 2015 Share Posted October 8, 2015 In fact, my first though was "arc". So I would +1 something with "arc". But I then go back in my brain (and in google, also ) and remembered how this is called in, for instance, 3DSMax (hemisphere and slice) Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 8, 2015 Share Posted October 8, 2015 As I understand it only one parameter is part of a circumference the other is part of a line. The other parameter is a truncation along a length of line rather than a circumference and so arc does not fit both. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted October 8, 2015 Share Posted October 8, 2015 Or we could called that : sphereVerticalPartialPartAsForInstanceACapStartingAtHeight and sphereCutOutAroundItsCircumferenceStartingAtAngleZeroAndStopingAtThat a good idea isn't it? hmm ? What do you think ? Great hmm ? :lol: Wingnut 1 Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 8, 2015 Share Posted October 8, 2015 Arc and slice work for me. Hemisphere for me is half a sphere and a bit long but if it is a recognised word in this context in the virtual world of 3D !!!! Quote Link to comment Share on other sites More sharing options...
adam Posted October 8, 2015 Share Posted October 8, 2015 I like arc (for y axis) and truncate or slice (for removing from height). Quote Link to comment Share on other sites More sharing options...
jerome Posted October 8, 2015 Author Share Posted October 8, 2015 Actually both are arcs (at least angles). When building the mesh sphere, we iterate over 2 * PI around an axis and over PI around another orthogonal axis, so two nested loops. What about simply "arc" for the circumference ratio, as this term would be used also for other mesh with rotations over 2PI like tubes, lathes, cylinders and "arc2" for the second arc which is only specific to the sphere ? I like the couple arc/slice too. Quote Link to comment Share on other sites More sharing options...
EJanuszewski Posted October 8, 2015 Share Posted October 8, 2015 My 3d vocabulary is limited so I'm not 100% sure about the Z axis (maybe circumZ/circumferenceZ) but for the Y I think slice is good, like a slice out of a pie or something, similar concept. Quote Link to comment Share on other sites More sharing options...
jerome Posted October 9, 2015 Author Share Posted October 9, 2015 let's keep arc for the circumference partelse, there's also "spherical segment" (quite long) for the height part : http://mathworld.wolfram.com/SphericalSegment.html [EDIT] I'm wrong, these are rather caps : http://mathworld.wolfram.com/SphericalCap.html [EDIT2] : I love the word lune also : http://mathworld.wolfram.com/SphericalLune.html Quote Link to comment Share on other sites More sharing options...
jerome Posted October 9, 2015 Author Share Posted October 9, 2015 So ? circumferenre : arc, arcRate, lune, luneRate ?height : capRate, slice, sliceRate ? (http://ceemrr.com/Geometry2/Sphere/Sphere_print.html) For now, I prefer "arc" (because it will be the same term then for tubes, cylinders, etc) and capRate (because cap is yet used for cylinder/tube caps) Quote Link to comment Share on other sites More sharing options...
JohnK Posted October 9, 2015 Share Posted October 9, 2015 Having slept on it and thinking about the result of the action rather than how the action is achieved then perhaps slice is a better term. You can take a slice of a sphere (think apple) of a cylinder parallel to its axis. For a sphere you could take a second slice perpendicular to the first so slice and slice2????? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.