For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Spheres around the circle

Vijayaragavan's picture
Forums: 

Hello All..
How to arrange spheres around the circle(in circular fashion)...It should look like rollers placed in ball bearing..we have x,y,z value for initial sphere(ball)..how to change the value of x,y,z for next spheres so that it is arranged in circular fashion...please tell the formula for drawing this...

Thanks in Advance
S.Vijayaragavan..

Mikael Aronsson's picture

Same way as you would calculate any point on a circle, using sin & cos

Vijayaragavan's picture

hi..
please tell me the formula...it deals with x,y,z axis..i am not getting it..i have tried but its not coming correctly..

Thqnks,
Vijay

Vijayaragavan's picture

hi,
Can u please send the sample program for placing spheres around the circle..I am designing bering in OCC..I hav designed outer and inner rings..I m not able to proceed with inner rollers...Please help me...

Thanks,
S.Vijayaragavan.

Sharjith Naramparambath's picture

Hi,
Your problem seems to be arranging the sphere along a pitch circle. You can write a loop which calculates the centre point of the sphere placed on the circle. Assuming that the pitch circle radius is R, and you have to place N balls in your bearing, you can find the X and Y coordinates of the points (assuming you are making it in XOY Plane) by the formula:-

X = R * cos(theta)
Y = R * sin(theta)

where theta ranges from 0 to 2PI radians in the step of 2PI/N. (N = num_of_balls).

Then in the loop itself you can create the sphere for with the centre as each point you compute.

Hope this helps

Regards
N. Sharjith

Vijayaragavan's picture

Hi Sharjith,
Thanks for your reply..Its working fine..
Regards,
S.Vijayaragavan.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.