Skip to content

Conversation

@salhus
Copy link
Contributor

@salhus salhus commented Sep 15, 2021

UPDATED: Sept. 11th. Saturday.

  • Updated wave class to accommodate N, (N \in Non-negative integers) from markers,
  • The Global reference block programmatically initiates and adds/deletes viz. blocks based on the number of markers (0 to
    N) defined by the user,
    Here are the steps to enable and define visualization blocks,
  1. Define an array with the first column defining the X coordinates, and the second column defining the corresponding Y coordinates. The User should define waves.markLoc = []. If no array is defined, there would be no markers and vice versa,
  2. Define marker style by defining waves.markStyle = []; % 1: Sphere, 2: Cube, 3: Frame.
  3. Define marker size in pixels by defining waves.markSize = []; % Marker Size in Pixels

Here is an example. In this example a mesh of points is described using the meshgrid command and then making it an array of X and Y coordinates using reshape().
.. Note: The user only needs to initiate the visualization and define an array of visualization blocks.

examples:

  1. A simple example with markers in a diagonal layout
    X = 2*[1;2;3;4;5];
    Y = 2*[1;2;3;4;5];
    waves.markLoc = [X,Y];
    waves.markStyle = 2; % 1: Sphere, 2: Cube, 3: Frame.
    waves.markSize = 15; % Marker Size in Pixels

diagViz

  1. An example with a square mesh of visualization blocks:

mrk = 10;
dmrk = 5;
[X,Y] = meshgrid(-mrk:dmrk:mrk,-mrk:dmrk:mrk);
waves.markLoc = [reshape(X,[],1),reshape(Y,[],1)]; % Marker Locations [X,Y]
clear('mrk','dmrk','X','Y')

waves.markStyle = 3; % 1: Sphere, 2: Cube, 3: Frame.
waves.markSize = 20; % Marker Size in Pixels

meshViz

@salhus
Copy link
Contributor Author

salhus commented Sep 15, 2021

@nathanmtom This PR is branched from the latest dev, so should have the necessary testing files.
@kmruehl I will be adding the documentation today, and update here.

@salhus
Copy link
Contributor Author

salhus commented Sep 15, 2021

@kmruehl @nathanmtom
I have added the pertinent documentation. I checked the htmls in the build folder. I also added examples in the @WEC-Sim/Applications.

I still have an issue though. I saved the library in 2020a, but the automated checks pass only for the latest version of MATLAB. Do let me know if you have any advice on that.

@jtgrasb
Copy link
Contributor

jtgrasb commented Sep 20, 2021

@salhus Just looked over this PR and documentation -- looks great! Not sure about the version issues, but hope that is figured out soon.

@salhus
Copy link
Contributor Author

salhus commented Sep 23, 2021

I modified and made this PR backwards compatible.
Refer #714

@salhus salhus closed this Sep 23, 2021
@salhus salhus deleted the VizMarkers branch October 1, 2021 18:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants