• S sverchok
  • Информация о проекте
    • Информация о проекте
    • Активность
    • Метки
    • Участники
  • Репозиторий
    • Репозиторий
    • Файлы
    • Коммиты
    • Ветки
    • Теги
    • Участники
    • Диаграмма
    • Сравнение
  • Задачи 148
    • Задачи 148
    • Список
    • Доски
    • Спринты
  • Запросы на слияние 21
    • Запросы на слияние 21
  • CI/CD
    • CI/CD
    • Конвейеры
    • Задания
    • Расписания
  • Развертывания
    • Развертывания
    • Окружения
    • Релизы
  • Пакеты и реестры
    • Пакеты и реестры
    • Реестр пакетов
    • Реестр контейнеров
  • Мониторинг
    • Мониторинг
    • Инциденты
  • Аналитика
    • Аналитика
    • Поток ценности
    • CI/CD
    • Репозиторий
  • Wiki
    • Wiki
  • Сниппеты
    • Сниппеты
  • Активность
  • Диаграмма
  • Создать новую задачу
  • Задания
  • Коммиты
  • Доски с задачами
Свернуть панель
  • nikitronn
  • sverchok
  • Задачи
  • #571
Закр.
Открыто
Задача созд. Фев 17, 2015 пользователемnikitronn@nikitronnВладелец

Matrix output of "Iterate" node

Created by: elfnor

The new "Iterate" or "Iterate matrix transform" node would be more consistent with other nodes such as "Matrix Interpolation" if it only had a Matrix and number of iterations as inputs and a list of powers of the input matrix as ouput. It would also, I think, calculate faster.

I quickly wrote up a "Scripted Node" to show this. Sorry I havn't looked at writing full nodes yet.

from mathutils import Matrix
from sverchok.data_structure import Matrix_listing


id_matrix = [[[1.0, 0.0, 0.0, 0.0],
             [0.0, 1.0, 0.0, 0.0],
             [0.0, 0.0, 1.0, 0.0],
             [0.0, 0.0, 0.0, 1.0]]]

def sv_main(mat1=id_matrix, pows = 1):

    in_sockets = [
        ['m', 'Matrix',  mat1],
        ['s', 'powers', pows]
    ]

    mat_in = Matrix(mat1[0])
    result = Matrix(id_matrix[0])

    mat_list = []
    mat_list.append(result)

    for i in range(pows):
        result = result * mat_in
        mat_list.append(result)   

    mat_out =  Matrix_listing(mat_list)

    out_sockets = [
        ['m', 'Mat out', mat_out]
    ]

    return in_sockets, out_sockets

pyramid_matrix_power_node blend

It produces the same output (as separate objects) as this: pyramid_interpolate_iterate_04 blend

Ответственный
Назначить
Оценка трудозатрат