Re: [Scilab-users] circshift() : Scilab Enhancement Proposal

2018-06-17 Thread Samuel Gougeon

Hello Rafael,

Le 07/06/2018 à 15:04, Rafael Guerra a écrit :


Hi Samuel,

Fyi, many DFT references recommend averaging the values at endpoints 
and discontinuities in general. See for instance:


Briggs, W. L. and V. E. Henson [1005] The DFT: an owner's manual for 
the Discrete Fourier Transform, SIAM, Philadelphia.




>and discontinuities in general

Yes, that's a point. If a specific processing is used for the edges, it 
would look strange to not implement it as well in the body of the 
initial signal. From here, a criteria (and likely some threshold) must 
be set to decide what's a discontinuity, and what's not.
I did not go into any reading -- and frankly, if there is a summarized 
performances comparison and a standard published procedure --, it would 
be easier just to implement it, instead of reinventing the wheel with 
external tests. Then, i am afraid that it will come either with some 
choices with respect to the type of input signal, or with a bunch of 
processing options (making circshift a signal processing function rather 
than just a general matrix handling operation).


Anyway, no damping window could process inner discontinuities.

To me, the main advantage of the DFT was to avoid local interpolations, 
in order to stay simple.
If the algo then implements some interpolations, why not performing the 
fractional part of the shift

only by interpolation, instead of /in addition/ to the DFT?
If you can provide some quantified rationale and possibly some finalized 
algo, it would be fine.


Best regards
Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Compute normals to 3D surface

2018-06-17 Thread Rafael Guerra
Hi Lester,


Try xarrows().

At the end of your code, add:

// Compute normals to surface
[x1,y1,z1]=surfnorm(x,y,z);
sf = 0.2;  // arrows scale factor
x1 = sf*x1 + x;
y1 = sf*y1 + y;
z1 = sf*z1 + z;
// Plot normal vectors to surface
xarrows([x(:)';x1(:)'],[y(:)';y1(:)'],[z(:)';z1(:)'],-1,2)

Regards,
Rafael

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] hist3d() puzzling rendering

2018-06-17 Thread Samuel Gougeon

Le 17/06/2018 à 19:25, Rafael Guerra a écrit :


Hi,


Preserving the color of the original hidden faces under 
interactive rotations, does not seem to be a bad idea.




The bug was not that the color of some faces changed with respect to the 
view angle, but that the hidden color was wrongly ascribed to some 
external visible faces.
By the way, the way Scilab ascribes the hidden color looks not 
documented. It follows the "screw" rule to set the external and internal 
faces. So, the order vertices are provided matters. I did not see it 
described in any page.



___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Compute normals to 3D surface

2018-06-17 Thread Stéphane Mottelet
Hello,

If you are using scilab 5.5.2 you can install the Plotlib (Atoms package). 
There is an example of normals plotting in the help page of quiver3.

S.

> Le 17 juin 2018 à 19:29, Lester Anderson  a écrit :
> 
> Hi Stéphane, Scilab users
> 
> Thanks for the information. I retrieved the surfnorm function, and the 
> associated functions that it called internally. I still cannot figure out how 
> it should work with the existing code;had to add the functions into the main 
> sce file to get it doing something (not sure why!).
> 
> The attached code shows where I am at so far,and a small image of what I 
> would like to get to.
> 
> [x1,y1,z1] = surfnorm(x,y,z) does generate value,but plot3d does not give a 
> meaningful result.Perhaps I am missing something very obvious, so any 
> pointers are great. 
> 
> Scilab 6.0.1 (64 bit Windows)
> 
> Thanks in advance
> Lester
> 
>> On 17 June 2018 at 07:47, Stéphane Mottelet  wrote:
>> Hello,
>> 
>> In the Plotlib you have an equivalent function :
>> 
>> 
>> http://forge.scilab.org/index.php/p/plotlib/source/tree/HEAD/tags/0.46/plotlib/macros/surfnorm.sci
>> 
>> S.
>> 
>> > Le 17 juin 2018 à 00:40, Lester Anderson  a écrit :
>> > 
>> > Hello all,
>> > 
>> > I was wondering if it was possible to compute and visualise the normals to 
>> > a 3D surface in Scilab? I think Matlab has something called surfnorm;is 
>> > there something similar for Scilab?
>> > 
>> > I have attached the basic code for the Moebius strip, and it would be 
>> > useful to showwhat happens to the normals at say z=0, but not sure how one 
>> > would go about this. Perhaps this has already been solved.
>> > 
>> > Cheers
>> > Lester
>> > 
>> > ___
>> > users mailing list
>> > users@lists.scilab.org
>> > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
>> 
>> ___
>> users mailing list
>> users@lists.scilab.org
>> http://lists.scilab.org/mailman/listinfo/users
> 
> 
> 
> ___
> users mailing list
> users@lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] hist3d() puzzling rendering

2018-06-17 Thread Samuel Gougeon

Hello Rafael,

Le 17/06/2018 à 19:25, Rafael Guerra a écrit :


Hi,


Preserving the color of the original hidden faces under 
interactive rotations, does not seem to be a bad idea. It allows 
assessing what parts of the objects are hidden under the original 
choice of view angles.


/The behaviour of plot3d is similar./



It's a plot3d() bug in 6.0 
, and hist3d() uses 
plot3d().
hist3d() had actually 2 bugs (not one). They are fixed @ 
https://codereview.scilab.org/20164


Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Compute normals to 3D surface

2018-06-17 Thread Lester Anderson
Hi Stéphane, Scilab users

Thanks for the information. I retrieved the surfnorm function, and the
associated functions that it called internally. I still cannot figure out
how it should work with the existing code;had to add the functions into the
main sce file to get it doing something (not sure why!).

The attached code shows where I am at so far,and a small image of what I
would like to get to.

[x1,y1,z1] = surfnorm(x,y,z) does generate value,but plot3d does not give a
meaningful result.Perhaps I am missing something very obvious, so any
pointers are great.

Scilab 6.0.1 (64 bit Windows)

Thanks in advance
Lester

On 17 June 2018 at 07:47, Stéphane Mottelet 
wrote:

> Hello,
>
> In the Plotlib you have an equivalent function :
>
>
> http://forge.scilab.org/index.php/p/plotlib/source/tree/
> HEAD/tags/0.46/plotlib/macros/surfnorm.sci
>
> S.
>
> > Le 17 juin 2018 à 00:40, Lester Anderson  a
> écrit :
> >
> > Hello all,
> >
> > I was wondering if it was possible to compute and visualise the normals
> to a 3D surface in Scilab? I think Matlab has something called surfnorm;is
> there something similar for Scilab?
> >
> > I have attached the basic code for the Moebius strip, and it would be
> useful to showwhat happens to the normals at say z=0, but not sure how one
> would go about this. Perhaps this has already been solved.
> >
> > Cheers
> > Lester
> > 
> > ___
> > users mailing list
> > users@lists.scilab.org
> > https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLm
> Zy/lists.scilab.org/mailman/listinfo/users
>
> ___
> users mailing list
> users@lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>


Moebius2.sce
Description: Binary data
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] hist3d() puzzling rendering

2018-06-17 Thread Rafael Guerra
Hi,


Preserving the color of the original hidden faces under interactive rotations, 
does not seem to be a bad idea. It allows assessing what parts of the objects 
are hidden under the original choice of view angles.

The behaviour of plot3d is similar.


Regards,

Rafael



From: users  on behalf of Samuel Gougeon 

Sent: 15 June 2018 14:02
To: International users mailing list for Scilab.
Subject: [Scilab-users] hist3d() puzzling rendering


Hello,

Using hist3d() -- just enter hist3d() to plot the example --, and rotating the 
figure in 3D (right-press and drag), we can note that the color of the 
different faces are not the same: 2 of the four faces are rendered with the 
hidden color (usually used for the internal or back faces), and the 2 other 
ones with the default or chosen color and color mode.

I was deeming that the usage of the hidden color for 2 over 4 apparent faces is 
a bug.

Now, i am wondering if it is not rather intentional, in order to have a kind of 
lighting effect.

I still think that, even if it was intentional, it should rather be fixed. Now, 
Scilab has some explicit lighting features.

But, before possibly processing the bug report, what's your opinion?

Samuel

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Function "locate" for 3d graphs

2018-06-17 Thread Rafael Guerra
Hi Iza,


Not sure if this is what you need but I wrote the following code you can try on:


// START OF CODE
//From param3d datatips to data vector
clear
clf
param3d()
datatipManagerMode(gcf())
// Edit --> Start Datatip manager --> Stop Datatip manager
input("ENTER to continue after stopping datatips","string")
e = gce()
n = size(e.datatips,1);
x = zeros(n,3);
for i=1:n
x(i,:) = e.datatips(i).data;
end
// END OF CODE


Regards,

Rafael
___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


Re: [Scilab-users] Compute normals to 3D surface

2018-06-17 Thread Stéphane Mottelet
Hello,

In the Plotlib you have an equivalent function :


http://forge.scilab.org/index.php/p/plotlib/source/tree/HEAD/tags/0.46/plotlib/macros/surfnorm.sci

S.

> Le 17 juin 2018 à 00:40, Lester Anderson  a écrit :
> 
> Hello all,
> 
> I was wondering if it was possible to compute and visualise the normals to a 
> 3D surface in Scilab? I think Matlab has something called surfnorm;is there 
> something similar for Scilab?
> 
> I have attached the basic code for the Moebius strip, and it would be useful 
> to showwhat happens to the normals at say z=0, but not sure how one would go 
> about this. Perhaps this has already been solved.
> 
> Cheers
> Lester
> 
> ___
> users mailing list
> users@lists.scilab.org
> https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

___
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users