Yves,

You have a bug on this line:
auto points = sampler.SampleCylinderZ((0.,0.,z_cylinder), r_cylinder, 0.0);

It should be:
auto points = sampler.SampleCylinderZ(ChVector<float>(0.,0.,z_cylinder), 
r_cylinder, 0.0);

--Radu


From: [email protected] <[email protected]> On Behalf 
Of Yves Eric Maxime Robert
Sent: Monday, June 20, 2022 8:11 PM
To: ProjectChrono <[email protected]>
Subject: [chrono] Questions about cylinder sampler

Hello,

I write because I observed some weird behavior with the random sampler in 
cylinders.
I attached a very simple test which samples particles with a given radius (1), 
in a disk of a given radius as well (20).

When running it and print the distance to [0,0], I obtain values that are well 
above 20.
Looking at the source code of the sampler, I do not really understand why. Do 
you have a clue of what I might be doing wrong?

Best regards,
Yves


--
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/fb695b77-75d5-441b-a0f9-805304b22de4n%40googlegroups.com<https://groups.google.com/d/msgid/projectchrono/fb695b77-75d5-441b-a0f9-805304b22de4n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"ProjectChrono" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/projectchrono/SA1PR06MB8226300C78F8B55FC4E3DF03A7B09%40SA1PR06MB8226.namprd06.prod.outlook.com.

Reply via email to