edges in 3D

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

edges in 3D

Usman Bhatti
Hello,

I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?

Attached with this mail my proposition for the shape that works with the following script.

|el1 el2 els el3| 
view := R3View new.
view camera translateLeft: -2; translateBackward:3.
el1 := (R3CubeShape new color: Color green) element.
el2 := (R3CubeShape new color: Color red) element.
el3 := (R3CubeShape new color: Color cyan) element.
els := { el1. el2. el3 }.
view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
view addAll: els.
R3XLineLayout on: els.
view addInteraction: R3MouseControl new.
view open.

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

Roassal3d.st (110K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: edges in 3D

abergel
Thanks!

We will have a look at it today or tomorrow.

Cheers,
Alexandre


On Oct 14, 2013, at 7:57 AM, Usman Bhatti <[hidden email]> wrote:

> Hello,
>
> I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?
>
> Attached with this mail my proposition for the shape that works with the following script.
>
> |el1 el2 els el3|
> view := R3View new.
> view camera translateLeft: -2; translateBackward:3.
> el1 := (R3CubeShape new color: Color green) element.
> el2 := (R3CubeShape new color: Color red) element.
> el3 := (R3CubeShape new color: Color cyan) element.
> els := { el1. el2. el3 }.
> view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
> view addAll: els.
> R3XLineLayout on: els.
> view addInteraction: R3MouseControl new.
> view open.
> <Roassal3d.st>_______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: edges in 3D

abergel
In reply to this post by Usman Bhatti
Hi Usman,

Sorry for the delay in our answer.
We have produced a new version of Roassal3d with a support for edges. Consider this example:
-=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-= 
| view e1 e2 e3 |
view := R3View new.
e1 := R3CubeShape element.
e1 translateToX: 1 y: 1 z: 1.

e2 := R3UVSphereShape element.
e2 translateToX: -1 y: 1 z: 1.

e3 := R3ConeShape element.
e3 translateToX: -1 y: -1 z: 1.

view add: e1; add: e2; add: e3.
view add: (R3LineShape blue elementFrom: e1 to: e2).
view add: (R3LineShape blue elementFrom: e2 to: e3).
view addInteraction: R3MouseControl new.
view open .
-=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-= 

It will produces the following:



Cheers,
Alexandre


On Oct 14, 2013, at 7:57 AM, Usman Bhatti <[hidden email]> wrote:

Hello,

I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?

Attached with this mail my proposition for the shape that works with the following script.

|el1 el2 els el3| 
view := R3View new.
view camera translateLeft: -2; translateBackward:3.
el1 := (R3CubeShape new color: Color green) element.
el2 := (R3CubeShape new color: Color red) element.
el3 := (R3CubeShape new color: Color cyan) element.
els := { el1. el2. el3 }.
view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
view addAll: els.
R3XLineLayout on: els.
view addInteraction: R3MouseControl new.
view open.
<Roassal3d.st>_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: edges in 3D

abergel
Forgot to say that we started to Mix Athens with Roassal 3d. Currently, it is not well modularized, which means you need the Athens support of Roassal in your image.
So, in short:
  1 - take a fresh Moose image (i.e., with Roassal loaded).
  2 - Manually load the package RoassalAthens from the Roassal repository
  3 - Load Roassal 3d
  4 - do it the example I gave in my previous email

It should work.

Currently we have a dependency from Roassal3d to Roassal because we want to have the ability to have tool tip, menus and so on. Does this makes sense to you? Do you feel this dependency is manageable?

Cheers,
Alexandre

On Oct 18, 2013, at 5:53 PM, Alexandre Bergel <[hidden email]> wrote:

> Hi Usman,
>
> Sorry for the delay in our answer.
> We have produced a new version of Roassal3d with a support for edges. Consider this example:
> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
> | view e1 e2 e3 |
> view := R3View new.
> e1 := R3CubeShape element.
> e1 translateToX: 1 y: 1 z: 1.
>
> e2 := R3UVSphereShape element.
> e2 translateToX: -1 y: 1 z: 1.
>
> e3 := R3ConeShape element.
> e3 translateToX: -1 y: -1 z: 1.
>
> view add: e1; add: e2; add: e3.
> view add: (R3LineShape blue elementFrom: e1 to: e2).
> view add: (R3LineShape blue elementFrom: e2 to: e3).
> view addInteraction: R3MouseControl new.
> view open .
> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
>
> It will produces the following:
>
>
> <Screen Shot 2013-10-18 at 5.53.36 PM.png>
>
> Cheers,
> Alexandre
>
>
> On Oct 14, 2013, at 7:57 AM, Usman Bhatti <[hidden email]> wrote:
>
>> Hello,
>>
>> I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?
>>
>> Attached with this mail my proposition for the shape that works with the following script.
>>
>> |el1 el2 els el3|
>> view := R3View new.
>> view camera translateLeft: -2; translateBackward:3.
>> el1 := (R3CubeShape new color: Color green) element.
>> el2 := (R3CubeShape new color: Color red) element.
>> el3 := (R3CubeShape new color: Color cyan) element.
>> els := { el1. el2. el3 }.
>> view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
>> view addAll: els.
>> R3XLineLayout on: els.
>> view addInteraction: R3MouseControl new.
>> view open.
>> <Roassal3d.st>_______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: edges in 3D

Usman Bhatti
In reply to this post by abergel
Hi Alex,

Thanx for adding the support for edges in Roassal 3D. I tried and it works.
Now, when I try to add several edges (5-10), there is a huge lag and the CPU (~97% mark) and memory utilization of Pharo (~ +300MB) become tremendously high. Which means that I can try things examples but for getting something useful to work would require some memory and load profiling.

Can you have a look?

Usman


On Fri, Oct 18, 2013 at 10:53 PM, Alexandre Bergel <[hidden email]> wrote:
Hi Usman,

Sorry for the delay in our answer.
We have produced a new version of Roassal3d with a support for edges. Consider this example:
-=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-= 
| view e1 e2 e3 |
view := R3View new.
e1 := R3CubeShape element.
e1 translateToX: 1 y: 1 z: 1.

e2 := R3UVSphereShape element.
e2 translateToX: -1 y: 1 z: 1.

e3 := R3ConeShape element.
e3 translateToX: -1 y: -1 z: 1.

view add: e1; add: e2; add: e3.
view add: (R3LineShape blue elementFrom: e1 to: e2).
view add: (R3LineShape blue elementFrom: e2 to: e3).

view addInteraction: R3MouseControl new.
view open .
-=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-= 

It will produces the following:



Cheers,
Alexandre


On Oct 14, 2013, at 7:57 AM, Usman Bhatti <[hidden email]> wrote:

Hello,

I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?

Attached with this mail my proposition for the shape that works with the following script.

|el1 el2 els el3| 
view := R3View new.
view camera translateLeft: -2; translateBackward:3.
el1 := (R3CubeShape new color: Color green) element.
el2 := (R3CubeShape new color: Color red) element.
el3 := (R3CubeShape new color: Color cyan) element.
els := { el1. el2. el3 }.
view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
view addAll: els.
R3XLineLayout on: els.
view addInteraction: R3MouseControl new.
view open.
<Roassal3d.st>_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev

-- 
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: edges in 3D

Usman Bhatti
In reply to this post by abergel



On Fri, Oct 18, 2013 at 10:57 PM, Alexandre Bergel <[hidden email]> wrote:
Forgot to say that we started to Mix Athens with Roassal 3d. Currently, it is not well modularized, which means you need the Athens support of Roassal in your image.
So, in short:
  1 - take a fresh Moose image (i.e., with Roassal loaded).
  2 - Manually load the package RoassalAthens from the Roassal repository
  3 - Load Roassal 3d
  4 - do it the example I gave in my previous email

It should work.

Currently we have a dependency from Roassal3d to Roassal because we want to have the ability to have tool tip, menus and so on. Does this makes sense to you? Do you feel this dependency is manageable?

It should not be a problem for our usage because we would like to have mix of 2D and 3D.
 

Cheers,
Alexandre

On Oct 18, 2013, at 5:53 PM, Alexandre Bergel <[hidden email]> wrote:

> Hi Usman,
>
> Sorry for the delay in our answer.
> We have produced a new version of Roassal3d with a support for edges. Consider this example:
> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
>       | view e1 e2 e3 |
>       view := R3View new.
>       e1 := R3CubeShape element.
>       e1 translateToX: 1 y: 1 z: 1.
>
>       e2 := R3UVSphereShape element.
>       e2 translateToX: -1 y: 1 z: 1.
>
>       e3 := R3ConeShape element.
>       e3 translateToX: -1 y: -1 z: 1.
>
>       view add: e1; add: e2; add: e3.
>       view add: (R3LineShape blue elementFrom: e1 to: e2).
>       view add: (R3LineShape blue elementFrom: e2 to: e3).
>       view addInteraction: R3MouseControl new.
>       view open .
> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
>
> It will produces the following:
>
>
> <Screen Shot 2013-10-18 at 5.53.36 PM.png>
>
> Cheers,
> Alexandre
>
>
> On Oct 14, 2013, at 7:57 AM, Usman Bhatti <[hidden email]> wrote:
>
>> Hello,
>>
>> I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?
>>
>> Attached with this mail my proposition for the shape that works with the following script.
>>
>> |el1 el2 els el3|
>> view := R3View new.
>> view camera translateLeft: -2; translateBackward:3.
>> el1 := (R3CubeShape new color: Color green) element.
>> el2 := (R3CubeShape new color: Color red) element.
>> el3 := (R3CubeShape new color: Color cyan) element.
>> els := { el1. el2. el3 }.
>> view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
>> view addAll: els.
>> R3XLineLayout on: els.
>> view addInteraction: R3MouseControl new.
>> view open.
>> <Roassal3d.st>_______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: edges in 3D

abergel
In reply to this post by Usman Bhatti
We will have a look at it.

Milton, Ronie, pueden ver lo que esta paseando con el consumo de memoria?

Cheers,
Alexandre


On Oct 21, 2013, at 3:08 PM, Usman Bhatti <[hidden email]> wrote:

> Hi Alex,
>
> Thanx for adding the support for edges in Roassal 3D. I tried and it works.
> Now, when I try to add several edges (5-10), there is a huge lag and the CPU (~97% mark) and memory utilization of Pharo (~ +300MB) become tremendously high. Which means that I can try things examples but for getting something useful to work would require some memory and load profiling.
>
> Can you have a look?
>
> Usman
>
>
> On Fri, Oct 18, 2013 at 10:53 PM, Alexandre Bergel <[hidden email]> wrote:
> Hi Usman,
>
> Sorry for the delay in our answer.
> We have produced a new version of Roassal3d with a support for edges. Consider this example:
> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
> | view e1 e2 e3 |
> view := R3View new.
> e1 := R3CubeShape element.
> e1 translateToX: 1 y: 1 z: 1.
>
> e2 := R3UVSphereShape element.
> e2 translateToX: -1 y: 1 z: 1.
>
> e3 := R3ConeShape element.
> e3 translateToX: -1 y: -1 z: 1.
>
> view add: e1; add: e2; add: e3.
> view add: (R3LineShape blue elementFrom: e1 to: e2).
> view add: (R3LineShape blue elementFrom: e2 to: e3).
>
> view addInteraction: R3MouseControl new.
> view open .
> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
>
> It will produces the following:
>
>
> <Screen Shot 2013-10-18 at 5.53.36 PM.png>
>
> Cheers,
> Alexandre
>
>
> On Oct 14, 2013, at 7:57 AM, Usman Bhatti <[hidden email]> wrote:
>
>> Hello,
>>
>> I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?
>>
>> Attached with this mail my proposition for the shape that works with the following script.
>>
>> |el1 el2 els el3|
>> view := R3View new.
>> view camera translateLeft: -2; translateBackward:3.
>> el1 := (R3CubeShape new color: Color green) element.
>> el2 := (R3CubeShape new color: Color red) element.
>> el3 := (R3CubeShape new color: Color cyan) element.
>> els := { el1. el2. el3 }.
>> view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
>> view addAll: els.
>> R3XLineLayout on: els.
>> view addInteraction: R3MouseControl new.
>> view open.
>> <Roassal3d.st>_______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: edges in 3D

abergel
In reply to this post by Usman Bhatti
Hi Usman,

Can you try the following example:
R3Example new edgeExample2

There are many many edges displayed and it moves smoothly. On Windows the example goes well. On my machine (MacBookAir), I have an error that appears times to time. If this is the case for you, simply modify the method with:

-=-=-=-=-=-=-=-=-=-=-=-=
R3Morph>>visibleObjectInScreenX: screenX y: screenY
        | id |
        stateTracker ifNil: [  ^nil ].
        ^ view
-=-=-=-=-=-=-=-=-=-=-=-=

Here is a screenshot:

https://www.facebook.com/photo.php?fbid=533958193357449&set=a.341189379300999.82969.340543479365589&type=1&theater

Cheers,
Alexandre

On Oct 29, 2013, at 5:59 PM, Alexandre Bergel <[hidden email]> wrote:

> Hi Usman,
>
> Can you try the following example:
> R3Example new edgeExample2
>
> There are many many edges displayed and it moves smoothly. On Windows the example goes well. On my machine (MacBookAir), I have an error that appears times to time. If this is the case for you, simply modify the method with:
>
> -=-=-=-=-=-=-=-=-=-=-=-=
> R3Morph>>visibleObjectInScreenX: screenX y: screenY
> | id |
> stateTracker ifNil: [  ^nil ].
> ^ view
> -=-=-=-=-=-=-=-=-=-=-=-=
>
> Cheers,
> Alexandre
>
> <Screen Shot 2013-10-29 at 5.41.40 PM.png>
>
> On Oct 21, 2013, at 10:08 AM, Usman Bhatti <[hidden email]> wrote:
>
>> Hi Alex,
>>
>> Thanx for adding the support for edges in Roassal 3D. I tried and it works.
>> Now, when I try to add several edges (5-10), there is a huge lag and the CPU (~97% mark) and memory utilization of Pharo (~ +300MB) become tremendously high. Which means that I can try things examples but for getting something useful to work would require some memory and load profiling.
>>
>> Can you have a look?
>>
>> Usman
>>
>>
>> On Fri, Oct 18, 2013 at 10:53 PM, Alexandre Bergel <[hidden email]> wrote:
>> Hi Usman,
>>
>> Sorry for the delay in our answer.
>> We have produced a new version of Roassal3d with a support for edges. Consider this example:
>> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
>> | view e1 e2 e3 |
>> view := R3View new.
>> e1 := R3CubeShape element.
>> e1 translateToX: 1 y: 1 z: 1.
>>
>> e2 := R3UVSphereShape element.
>> e2 translateToX: -1 y: 1 z: 1.
>>
>> e3 := R3ConeShape element.
>> e3 translateToX: -1 y: -1 z: 1.
>>
>> view add: e1; add: e2; add: e3.
>> view add: (R3LineShape blue elementFrom: e1 to: e2).
>> view add: (R3LineShape blue elementFrom: e2 to: e3).
>>
>> view addInteraction: R3MouseControl new.
>> view open .
>> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
>>
>> It will produces the following:
>>
>>
>> <Screen Shot 2013-10-18 at 5.53.36 PM.png>
>>
>> Cheers,
>> Alexandre
>>
>>
>> On Oct 14, 2013, at 7:57 AM, Usman Bhatti <[hidden email]> wrote:
>>
>>> Hello,
>>>
>>> I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?
>>>
>>> Attached with this mail my proposition for the shape that works with the following script.
>>>
>>> |el1 el2 els el3|
>>> view := R3View new.
>>> view camera translateLeft: -2; translateBackward:3.
>>> el1 := (R3CubeShape new color: Color green) element.
>>> el2 := (R3CubeShape new color: Color red) element.
>>> el3 := (R3CubeShape new color: Color cyan) element.
>>> els := { el1. el2. el3 }.
>>> view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
>>> view addAll: els.
>>> R3XLineLayout on: els.
>>> view addInteraction: R3MouseControl new.
>>> view open.
>>> <Roassal3d.st>_______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: edges in 3D

Usman Bhatti
Tx Alex, it much better now. 
For the time, all examples and my code didn't throw any error so I didn't need to change the method.

Usman


On Tue, Oct 29, 2013 at 10:03 PM, Alexandre Bergel <[hidden email]> wrote:
Hi Usman,

Can you try the following example:
R3Example new edgeExample2

There are many many edges displayed and it moves smoothly. On Windows the example goes well. On my machine (MacBookAir), I have an error that appears times to time. If this is the case for you, simply modify the method with:

-=-=-=-=-=-=-=-=-=-=-=-=
R3Morph>>visibleObjectInScreenX: screenX y: screenY
        | id |
        stateTracker ifNil: [  ^nil ].
        ^ view
-=-=-=-=-=-=-=-=-=-=-=-=

Here is a screenshot:

https://www.facebook.com/photo.php?fbid=533958193357449&set=a.341189379300999.82969.340543479365589&type=1&theater

Cheers,
Alexandre

On Oct 29, 2013, at 5:59 PM, Alexandre Bergel <[hidden email]> wrote:

> Hi Usman,
>
> Can you try the following example:
> R3Example new edgeExample2
>
> There are many many edges displayed and it moves smoothly. On Windows the example goes well. On my machine (MacBookAir), I have an error that appears times to time. If this is the case for you, simply modify the method with:
>
> -=-=-=-=-=-=-=-=-=-=-=-=
> R3Morph>>visibleObjectInScreenX: screenX y: screenY
>       | id |
>       stateTracker ifNil: [  ^nil ].
>       ^ view
> -=-=-=-=-=-=-=-=-=-=-=-=
>
> Cheers,
> Alexandre
>
> <Screen Shot 2013-10-29 at 5.41.40 PM.png>
>
> On Oct 21, 2013, at 10:08 AM, Usman Bhatti <[hidden email]> wrote:
>
>> Hi Alex,
>>
>> Thanx for adding the support for edges in Roassal 3D. I tried and it works.
>> Now, when I try to add several edges (5-10), there is a huge lag and the CPU (~97% mark) and memory utilization of Pharo (~ +300MB) become tremendously high. Which means that I can try things examples but for getting something useful to work would require some memory and load profiling.
>>
>> Can you have a look?
>>
>> Usman
>>
>>
>> On Fri, Oct 18, 2013 at 10:53 PM, Alexandre Bergel <[hidden email]> wrote:
>> Hi Usman,
>>
>> Sorry for the delay in our answer.
>> We have produced a new version of Roassal3d with a support for edges. Consider this example:
>> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
>>      | view e1 e2 e3 |
>>      view := R3View new.
>>      e1 := R3CubeShape element.
>>      e1 translateToX: 1 y: 1 z: 1.
>>
>>      e2 := R3UVSphereShape element.
>>      e2 translateToX: -1 y: 1 z: 1.
>>
>>      e3 := R3ConeShape element.
>>      e3 translateToX: -1 y: -1 z: 1.
>>
>>      view add: e1; add: e2; add: e3.
>>      view add: (R3LineShape blue elementFrom: e1 to: e2).
>>      view add: (R3LineShape blue elementFrom: e2 to: e3).
>>
>>      view addInteraction: R3MouseControl new.
>>      view open .
>> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
>>
>> It will produces the following:
>>
>>
>> <Screen Shot 2013-10-18 at 5.53.36 PM.png>
>>
>> Cheers,
>> Alexandre
>>
>>
>> On Oct 14, 2013, at 7:57 AM, Usman Bhatti <[hidden email]> wrote:
>>
>>> Hello,
>>>
>>> I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?
>>>
>>> Attached with this mail my proposition for the shape that works with the following script.
>>>
>>> |el1 el2 els el3|
>>> view := R3View new.
>>> view camera translateLeft: -2; translateBackward:3.
>>> el1 := (R3CubeShape new color: Color green) element.
>>> el2 := (R3CubeShape new color: Color red) element.
>>> el3 := (R3CubeShape new color: Color cyan) element.
>>> els := { el1. el2. el3 }.
>>> view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
>>> view addAll: els.
>>> R3XLineLayout on: els.
>>> view addInteraction: R3MouseControl new.
>>> view open.
>>> <Roassal3d.st>_______________________________________________
>>> Moose-dev mailing list
>>> [hidden email]
>>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>> --
>> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>>
>>
>> _______________________________________________
>> Moose-dev mailing list
>> [hidden email]
>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: edges in 3D

abergel
:-)

Alexandre


On Oct 30, 2013, at 9:27 AM, Usman Bhatti <[hidden email]> wrote:

> Tx Alex, it much better now.
> For the time, all examples and my code didn't throw any error so I didn't need to change the method.
>
> Usman
>
>
> On Tue, Oct 29, 2013 at 10:03 PM, Alexandre Bergel <[hidden email]> wrote:
> Hi Usman,
>
> Can you try the following example:
> R3Example new edgeExample2
>
> There are many many edges displayed and it moves smoothly. On Windows the example goes well. On my machine (MacBookAir), I have an error that appears times to time. If this is the case for you, simply modify the method with:
>
> -=-=-=-=-=-=-=-=-=-=-=-=
> R3Morph>>visibleObjectInScreenX: screenX y: screenY
>         | id |
>         stateTracker ifNil: [  ^nil ].
>         ^ view
> -=-=-=-=-=-=-=-=-=-=-=-=
>
> Here is a screenshot:
>
> https://www.facebook.com/photo.php?fbid=533958193357449&set=a.341189379300999.82969.340543479365589&type=1&theater
>
> Cheers,
> Alexandre
>
> On Oct 29, 2013, at 5:59 PM, Alexandre Bergel <[hidden email]> wrote:
>
> > Hi Usman,
> >
> > Can you try the following example:
> > R3Example new edgeExample2
> >
> > There are many many edges displayed and it moves smoothly. On Windows the example goes well. On my machine (MacBookAir), I have an error that appears times to time. If this is the case for you, simply modify the method with:
> >
> > -=-=-=-=-=-=-=-=-=-=-=-=
> > R3Morph>>visibleObjectInScreenX: screenX y: screenY
> >       | id |
> >       stateTracker ifNil: [  ^nil ].
> >       ^ view
> > -=-=-=-=-=-=-=-=-=-=-=-=
> >
> > Cheers,
> > Alexandre
> >
> > <Screen Shot 2013-10-29 at 5.41.40 PM.png>
> >
> > On Oct 21, 2013, at 10:08 AM, Usman Bhatti <[hidden email]> wrote:
> >
> >> Hi Alex,
> >>
> >> Thanx for adding the support for edges in Roassal 3D. I tried and it works.
> >> Now, when I try to add several edges (5-10), there is a huge lag and the CPU (~97% mark) and memory utilization of Pharo (~ +300MB) become tremendously high. Which means that I can try things examples but for getting something useful to work would require some memory and load profiling.
> >>
> >> Can you have a look?
> >>
> >> Usman
> >>
> >>
> >> On Fri, Oct 18, 2013 at 10:53 PM, Alexandre Bergel <[hidden email]> wrote:
> >> Hi Usman,
> >>
> >> Sorry for the delay in our answer.
> >> We have produced a new version of Roassal3d with a support for edges. Consider this example:
> >> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
> >>      | view e1 e2 e3 |
> >>      view := R3View new.
> >>      e1 := R3CubeShape element.
> >>      e1 translateToX: 1 y: 1 z: 1.
> >>
> >>      e2 := R3UVSphereShape element.
> >>      e2 translateToX: -1 y: 1 z: 1.
> >>
> >>      e3 := R3ConeShape element.
> >>      e3 translateToX: -1 y: -1 z: 1.
> >>
> >>      view add: e1; add: e2; add: e3.
> >>      view add: (R3LineShape blue elementFrom: e1 to: e2).
> >>      view add: (R3LineShape blue elementFrom: e2 to: e3).
> >>
> >>      view addInteraction: R3MouseControl new.
> >>      view open .
> >> -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
> >>
> >> It will produces the following:
> >>
> >>
> >> <Screen Shot 2013-10-18 at 5.53.36 PM.png>
> >>
> >> Cheers,
> >> Alexandre
> >>
> >>
> >> On Oct 14, 2013, at 7:57 AM, Usman Bhatti <[hidden email]> wrote:
> >>
> >>> Hello,
> >>>
> >>> I am trying to create a new shape, an edge, in Roassal 3D between two entities. My idea is to draw an edge from the position vector of a source shape to the position vector of a target. The edge is created but not at the correct position, it might be due to the fact that I need to set the position of the edge shape or mismatch between position in Roassal and OpenGL. Can you please have a look?
> >>>
> >>> Attached with this mail my proposition for the shape that works with the following script.
> >>>
> >>> |el1 el2 els el3|
> >>> view := R3View new.
> >>> view camera translateLeft: -2; translateBackward:3.
> >>> el1 := (R3CubeShape new color: Color green) element.
> >>> el2 := (R3CubeShape new color: Color red) element.
> >>> el3 := (R3CubeShape new color: Color cyan) element.
> >>> els := { el1. el2. el3 }.
> >>> view add: (R3EdgeShape new from: el2; to: el3; size: 1; color: Color blue) element.
> >>> view addAll: els.
> >>> R3XLineLayout on: els.
> >>> view addInteraction: R3MouseControl new.
> >>> view open.
> >>> <Roassal3d.st>_______________________________________________
> >>> Moose-dev mailing list
> >>> [hidden email]
> >>> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >>
> >> --
> >> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> >> Alexandre Bergel  http://www.bergel.eu
> >> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >>
> >>
> >>
> >>
> >> _______________________________________________
> >> Moose-dev mailing list
> >> [hidden email]
> >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >>
> >>
> >> _______________________________________________
> >> Moose-dev mailing list
> >> [hidden email]
> >> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
> >
> > --
> > _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> > Alexandre Bergel  http://www.bergel.eu
> > ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
> >
> >
> >
>
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev
>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.




_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev